Get the latest tech news
Show HN: es6_maps, new Elixir syntax feature via runtime compiler hacking
ES6-like shorthand syntax for Elixir maps: `%{foo, bar} = map; IO.puts(foo)` - kzemek/es6_maps
When writing code that heavily utilizes structures and passes complex objects through multiple layers, it's common to frequently use map literals. I believe that introducing a shorthand form of object creation to Elixir enhances the language's ergonomics and is a natural extension of its existing map literals syntax. es6_maps includes a formatting plugin that will convert your existing map and struct literals into the shorthand style.
Or read this on Hacker News