In 2018 there was talk about adopting an unboxed
Option type for Dotty/Scala 3. Sébastien worked on it then. References:
- I wrote a zero-allocation `Option`-style (monadic) data structure for Scala a wh... | Hacker News
It seemed like this was working and that some incomplete performance tests were done, and then… nothing. Is there a reason besides manpower not to continue working on this?
From a performance (hopefully) and marketing perspective, being able to say that we have an
Option type that doesn’t box would be a positive. You would also be able to tell beginners (and not so beginners) not to fear
Option because it has no runtime cost (at least for reference types).
Related: Pre-SIP: Unboxed wrapper types