Alejandro Serrano.Mena
07/02/2025, 10:56 AMzt
07/09/2025, 2:21 PM{ val a, val b } = Pair(1, 2)
In my opinion it's more natural I think
Another thing what if the `val`/`var` could be lifted out the destructuring block if theyre all the same? Correct me if I'm wrong but immutable fields would be more common when destructuring. So it would be simpler to write for example
val { a, b } = Pair(0, 1)
Alejandro Serrano.Mena
07/10/2025, 7:26 AM{ val x
, it cannot distinguish whether a new block is starting, or a destructuring is startingAlejandro Serrano.Mena
07/10/2025, 7:27 AMval (a, b)
syntax (or val [a, b]
) we all know and love