While working on some ZIO code, I started investigating a way to directly unpack tuples in a for comprehension as “better-monadic-for” does and found that
-source:future already allows this.
I found an issue (Decide what `future` behavior should be enabled in 3.3 · Issue #16334 · lampepfl/dotty · GitHub) that started this discussion but didn’t had a definition on which features should become default. The tuple unpacking is under the “refutable pattern binding” and was added in Emit strict pattern binding warnings by default · lampepfl/dotty@0bddf1b · GitHub.
What would it take to make this into the next Scala version, whether it’s 3.3 which is LTS or the next minor (3.4).
A sample of this can be seen at Scastie - An interactive playground for Scala. and discussed in ZIO’s issue retrieve a tuple directly in a for comprehension with ZIO? · Issue #2761 · zio/zio · GitHub.