Re:Thoughts on Elixir, Phoenix and LiveView after 18 months ...
by sethcalebweeks on Monday August 14, 2023 @01:27AM
(#37117773)
Keyword lists were certainly confusing as a newcomer. But, FWIW, they existed well before maps. The AST is made up of only tuples and keyword lists on top of atoms and other literals. (Actually, if I'm not mistaken, keyword lists themselves are just lists with tuples of atom/value pairs. If you dig far enough down, it's incredible just how much of the language is built on top of a tiny number of primitives. Almost every bit of syntax you can think of is probably several layers of macros.)
[ Parent
| on HN ]
Re:Thoughts on Elixir, Phoenix and LiveView after 18 months ...
by bobwaycott on Monday August 14, 2023 @03:04AM
(#37118279)
> Actually, if I'm not mistaken, keyword lists themselves are just lists with tuples of atom/value pairs.
You are correct. A keyword list is `[{atom, any}]`.