improvement-proposals icon indicating copy to clipboard operation
improvement-proposals copied to clipboard

SIP-59 - Multiple assignments

Open kyouko-taiga opened this issue 1 year ago • 4 comments

kyouko-taiga avatar Jan 17 '24 15:01 kyouko-taiga

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.

lihaoyi avatar Jan 19 '24 15:01 lihaoyi

Proof of concept implementation is in progress (see here).

kyouko-taiga avatar Feb 02 '24 16:02 kyouko-taiga

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

sjrd avatar Feb 16 '24 15:02 sjrd

The SIP committee voted today to accept this SIP at the Design stage, modulo the comments from last meeting (just above).

sjrd avatar Mar 15 '24 15:03 sjrd