whatyouhide / short_maps

⚠️Retired⚠️ library that provided a ~m sigil for ES6-like map destructuring in Elixir.
https://andrealeopardi.com/posts/a-story-of-regret-and-retiring-a-library-from-hex/
77 stars 5 forks source link

Add support for the pin operator to avoid rebinding #1

Closed jwarlander closed 9 years ago

jwarlander commented 9 years ago

This patch adds support for the pin operator in a reasonably straightforward way. Have a look, and don't hesitate to let me know if something should be done differently!

whatyouhide commented 9 years ago

Looks great @jwarlander!

For the record, I'm not very sure about this. The ~m is already a little bit "magic" for Elixir's standards and I think this makes it even more hard to grasp, but I ^ is useful so no doubts about that. Also, I guess people expect ^ to work (maybe as you did? :smile:) since it works in maps.

I'm happily merging as this library is an experiment to see what the community thinks about the idea, so thanks a lot for the contribution! :heart:

By the way, the code looks awesome!