Hacker News new | ask | show | jobs
by sb8244 768 days ago
I don't agree that this is magic. It's only "magic" because the language doesn't do it today (thus requiring the compiler extension.) If this were in the language itself, it would probably be pretty popular.

The argument against it feels like "because we've always done it this way."

1 comments

Agreed. It's just syntax, similar to implicit keywords (mentioned already) and & anonymous functions[0].

Pattern matching a large number of items off a map is verbose. Putting many new keys in a map can be verbose if they're existing variables.

I'd rather have shorter code that was just as readable than many lines that add to cruft.

[0] Reading `&%{foo: &1.bar}` as a new Elixir dev looks like character soup and is arguably more magical.