Shapes vs. Materials
A quick pointer for the folks paying attention to the deep details of possible Scala 3: Martin just opened this interesting issue, discussing some possible tweaks to type inference to make it a bit cleaner.
I recommend reading the ticket for more detail, but the tl;dr is that some traits (eg, Product
or Serializable
) tend to mess up type inference for the classes that inherit from them. The notion at hand is, instead of trying to fix those in an ad-hoc way, introduce a new concept of “shape” traits that are handled slightly differently, and language support to define such traits formally.
This is just an idea at this point — not even working code, much less a proposal for Scala 3. But it’s worth reading, and commenting on if you have thoughts.