Skip to content

Add macro implementation exercise#401

Merged
coriolinus merged 2 commits intoexercism:masterfrom
coriolinus:add-macros-exercise
Nov 30, 2017
Merged

Add macro implementation exercise#401
coriolinus merged 2 commits intoexercism:masterfrom
coriolinus:add-macros-exercise

Conversation

@coriolinus
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread exercises/macros/.meta/description.md Outdated
@@ -0,0 +1,30 @@

Copy link
Copy Markdown
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

Comment thread exercises/macros/README.md Outdated
@@ -0,0 +1,71 @@
# Macros


Copy link
Copy Markdown
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