FWIW, I think this feature could likely get accepted into Elixir. The main problem IMO is that most people want bare words, but Jose wants there to be a visible distinction so it’s clear what the key type is. I think if someone proposed the ruby style syntax for this instead and was willing to do the work to implement it, it’d be accepted.
Basically, instead of:
iex> foo = 1
iex> %{hello, bar} = %{foo, hello: "world", bar: 2}
do:
iex> foo = 1
iex> %{hello:, bar:} = %{foo:, hello: "world", bar: 2}
I don’t see anywhere in your examples anything about the pin operator (^), map update syntax %{x | foo: 1}, structs %Foo{bar: 1}, or struct update syntax %Foo{baz | bar: 1}. If they’re not supported, I’d argue they should be added.


















