Hi,
What do you think about adding map deconstruction syntax similar to JavaScript. It would remove the need to declare the key and binding variable when they are identical names.
Often the map keys and binding var use the same name:
# without deconstruction
%{name: name, email: email} = user
vs
# with deconstruction (identical)
%{name, email} = user
This would work too for function definitions `def send_email(%{name, email}) do ...`, pattern matching ` case user, do: %{name, email} -> ....` as well as updates `%{user | email, name}`.
It would also require updating `mix format` to replace `%{key: key}` with `%{key}`
Here is a prototype of the changes required to the compiler:
Josh