improvement-proposals
improvement-proposals copied to clipboard
SIP-59 - Multiple assignments
I like this proposal in general. I've hit all the pain points in my own experience. Scala has always been a hybrid language, and the way the immutable multiple-assignment with val does not have a mutable multiple-assignment equivalent has always been a bit of a wart.
There are some subtleties around the implementation, especially around evaluation order, but from a UX perspective I think we should definitely have this.
Proof of concept implementation is in progress (see here).
We discussed this SIP during today's meeting. Although we did not vote on it yet, there is broad consensus that we want to accept it.
We have two pieces of feedback regarding the somewhat open questions. Overall, the committee would be in favor of:
- Only allow one level, flat tuple on the left
- Allow an arbitrary expression of the right tuple type on the right
The SIP committee voted today to accept this SIP at the Design stage, modulo the comments from last meeting (just above).