I was catching up with the other discussions about this, and I'm having seconds thoughts about Elixir having this syntax sugar for maps. It all sums up to what Austin pointed out here <https://groups.google.com/g/elixir-lang-core/c/P6VprVlRd6k/m/hMmgSniMAgAJ>.
The bottom line, IMO (and agreeing with Austin), would be to end having something like `%{"foo", 'bar', :baz} = %{"foo" => 1, 'bar' => 2, :baz => 3}; {foo, bar, baz} #=> {1, 2, 3}`, to solve the atom/string key problem, and given that I'd prefer not to have it and leave Elixir as it is today. I also don't see any other tool (like a formatter or a language server) doing this kind of job. Why would I write something if that's not the language's syntax? If we open this precedent I'm not sure where we may end up with (probably would end up like JS: being transcripted by transpilers). Plus, the misspelling argument is not appealing enough too, since a good test covered application (which IMO should be our desire and intention) would have that caught. To add a little more, since we should use atoms with caution due to platform's limitations, we shouldn't make easier to enforce their usage, and since the %{ foo } = %{ foo: "any value" } syntax sugar would favour it, I am convinced enough *to not have* this on Elixir, contradicting myself in a previous proposal. Em quinta-feira, 29 de junho de 2023 às 16:24:06 UTC+2, José Valim escreveu: > : is not an operator at the user level for JS but it behaves like one > syntactically. You can add or remove spaces on either side and it works. > That’s not true for Ruby or Elixir as moving the spaces around is either > invalid or has a different meaning. > -- 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/5ae1f9a1-2e11-46fe-b7de-20b1cf84af53n%40googlegroups.com.