{"by":"kzemek","descendants":30,"id":40333500,"kids":[40334830,40336846,40335220,40334012,40336020,40334598],"score":71,"text":"Hi HN! I thought you might enjoy this even if you don&#x27;t know much about Elixir.<p>`es6_maps` is a small library that introduces a &quot;shorthand&quot; map creation syntax, similar to shorthand object construction in JavaScript&#x2F;TypeScript. For those unfamiliar with Elixir, the most interesting aspect might be how it achieves this. `es6_maps` takes advantage of BEAM (Erlang&#x27;s VM) hot-reload capabilities to amend the Elixir compiler bytecode at runtime, adding functions that expand the shorthand syntax for further compilation. I think it&#x27;s a nice showcase of the power you can wield (with care) when writing in BEAM languages.<p>Let me know what you think!","time":1715512665,"title":"Show HN: es6_maps, new Elixir syntax feature via runtime compiler hacking","type":"story","url":"https://github.com/kzemek/es6_maps"}