Record field punning would be nice
It would be nice to write something like CodepointInfo[codepoint: cp, upper, lower, title] instead of CodepointInfo[codepoint: cp, upper: upper, lower: lower, title: title]. OCaml has a mechanism for this called field punning, Haskell has something similar.
In Elixir it would be possible to alter Record.access so that CodepointInfo[upper, lower, title, codepoint: cp] is allowed (note that punned arguments have to go before unpunned arguments due to the usual syntax rules).
This is a bit of a discussion ticket: is field punning desirable (enough) and would this be the right way to go about it?
It would make a lot of my code easier on the eyes for sure.
Hey @pminten, can you please move this discussion to the core mailing list? It will spark a better discussion for sure. Also, can you please include examples from Haskell and Ocaml and go over the list of upsides/downsides? Thanks!