exercism / exercism/elixir

Implement new Concept Exercise: `dynamic-dispatch`

Đang mở
#558 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
concept-exercise v3 x:action/create x:knowledge/intermediate x:module/concept-exercise x:size/large x:type/content
Ngôn ngữ chính
Elixir
Star
664
Fork
416
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## Getting started

**Please please please read the docs before starting.** Posting PRs without reading these docs will be a lot more frustrating for you during the review cycle, and exhaust Exercism's maintainers' time. So, before diving into the implementation, please read up on the following documents:

- [The features of v3](https://github.com/exercism/v3/blob/master/docs/features-of-v3.md).
- [Rationale for v3](https://github.com/exercism/v3/blob/master/docs/rationale-for-v3.md).
- [What are concept exercise and how they are structured?](https://github.com/exercism/v3/blob/master/docs/concept-exercises.md)

## Goal

The goal of this exercise is to replace `rpn-calculator-output` as the exercise that teaches dynamic dispatch (https://elixir-lang.org/getting-started/typespecs-and-behaviours.html#dynamic-dispatch). `rpn-calculator-output` should be modified to depend on `dynamic-dispatch` instead of teaching it. Make sure to reuse part of that exercise's introduction.

## Learning objectives

- Know that you module names are just atoms
- Know that you can call a function on a module even if its stored in a variable
- `apply`
- Know how to concatenate module names? e.g. https://hexdocs.pm/elixir/Module.html#safe_concat/1

## Out of scope

?

## Concepts

- `dynamic-dispatch`

## Prerequisites

Depends on the story.

## Exercises

Add `dynamic-dispatch` as a prerequisite of `forth`.

## Resources to refer to

https://elixir-lang.org/getting-started/typespecs-and-behaviours.html#dynamic-dispatch

## Implementing

Since dynamic dispatch depends on the existence of a few modules with the same function, we might want to provide that in the boilerplate instead of having the student implement those too.

## Help

If you have any questions while implementing the exercise, please post the questions as comments in this issue.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.