Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

[Elixir] Implement new Concept Exercise: dynamic-dispatch #2803

Closed
angelikatyborska opened this issue Nov 17, 2020 · 3 comments
Closed

[Elixir] Implement new Concept Exercise: dynamic-dispatch #2803

angelikatyborska opened this issue Nov 17, 2020 · 3 comments
Labels
status/help-wanted Extra attention is needed track/elixir type/new-exercise Add a new exercise

Comments

@angelikatyborska
Copy link
Contributor

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:

Please also watch the following video:

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?

Out of scope

?

Concepts

  • dynamic-dispatch

Prerequisites

Depends on the story.

Resources to refer to

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

Story

Look through existing stories (/reference/stories/) to find inspiration or an existing story that can work for this exercise, or come up with a totally original idea.

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.

@angelikatyborska angelikatyborska added status/help-wanted Extra attention is needed type/new-exercise Add a new exercise labels Nov 17, 2020
@angelikatyborska
Copy link
Contributor Author

Does apply (https://hexdocs.pm/elixir/Kernel.html#apply/3) qualify as dynamic dispatch?

@tejasbubane
Copy link
Member

Does apply (https://hexdocs.pm/elixir/Kernel.html#apply/3) qualify as dynamic dispatch?

I think it does. If needed we can mention the fact that apply cannot be invoked with macros.

@angelikatyborska
Copy link
Contributor Author

Migrated to the Elixir track repo: exercism/elixir#558

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/help-wanted Extra attention is needed track/elixir type/new-exercise Add a new exercise
Projects
None yet
Development

No branches or pull requests

2 participants