Hi,

what if Elixir supported this new syntax for pattern matching of maps, in 
which for example,

%{key1, key2}

would be the same as

%{key1: key1, key2: key2}

Also, the following

%{key1, ^key2}

would be the same as

%{key1: key1, key2: ^key2}

What do you think?

I find myself repeating this pattern many times, and I believe this can 
make the code more succinct and clear.

Obviously this would only work when key1 and key2 are variable names, not 
expressions.

Probably this has been proposed before, ... but I do not know.

What do you think?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/91798d02-a5e5-4d65-8b6d-effe77c0be09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to