For what's it's worth, I generally see people wanting this for map 
deconstruction instead of construction. When it comes to deconstruction, we 
already have a different syntax for maps with atom keys. 

foo = %{bar: "baz"}
foo.bar

> Here is a really contrived example:
> 
> `%Struct{some_xy1_stup4d_8345324_name: some_xy1_stup4d_8354324_name} = value

To me, this contrived example lends itself to not supporting this syntax. 
Personally, if I recieved some JSON or something else that had such a long and 
complicated name, I would opt to somehow shorten the variable name in my code. 
So I would choose to not use this syntax as I would not want to have to type 
that huge variable name multiple times, even with the help of auto complete. 

Another point to think about is that the internals of our programs do not 
always translate 1:1 through every boundary in our program. UI elements get 
renamed, features get renamed, etc. It is much easier to just rename a map key 
at one of my application boundaries instead of having to rename every use of a 
given variable in order to support this feature. 

Just a few quick thoughts. 

Justin

-- 
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 elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/91427e5d-951f-4bbc-b63e-ffa1eabf3c56%40app.fastmail.com.

Reply via email to