Skip to content

Add macro implementation exercise #401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 30, 2017

Conversation

coriolinus
Copy link
Member

Closes #397.

This exercise requires that students implement a hashmap! macro
to simplify creation of hashmap literals. The intent is to gently
introduce macros-by-example by having them implement a macro which
is both simple but useful.

The maplit crate which inspired
this exercise uses the MIT license,
which as far as I can tell permits this derivative use of its code.

Used first edition book link in the readme because second edition's
macros chapter is not yet written.

Closes exercism#397.

This exercise requires that students implement a `hashmap!` macro
to simplify creation of hashmap literals. The intent is to gently
introduce macros-by-example by having them implement a macro which
is both simple but useful.

The [maplit crate](https://crates.io/crates/maplit) which inspired
this exercise uses the [MIT license](https://opensource.org/licenses/MIT),
which as far as I can tell permits this derivative use of its code.

Used first edition book link in the readme because second edition's
macros chapter is not yet written.
Copy link
Member

@petertseng petertseng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope I do not disappoint by saying there is nothing I would change. Maybe one thing about the description, but nothing about the exercise code. Feel free to take the suggestion or not.

In an ideal world, I would attempt to complete this exercise myself before approving it, but that will not be possible.

@@ -0,0 +1,30 @@

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this extra line could go, unless it is very important to have two newlines after the title

@@ -0,0 +1,71 @@
# Macros


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(which will cause this newline to go too)

@coriolinus coriolinus merged commit 9ca81aa into exercism:master Nov 30, 2017
@coriolinus coriolinus deleted the add-macros-exercise branch November 30, 2017 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants