4 ms·
Yeah, it's a good feature. It's been done carefully -- there's room to do more of this kind of upcast conversion in the future -- but there's also a danger of c
by phillipcarter 5y ago
Yeah, it's a good feature. It's been done carefully -- there's room to do more of this kind of upcast conversion in the future -- but there's also a danger of creating code that behaves weirdly, too. See here for some of the dangers in Scala 2: https://latkin.org/blog/2017/05/02/when-the-scala-compiler-doesnt-help/ https://latkin.org/blog/2017/05/02/when-the-scala-compiler-d...
- odersky 5y agoIt's worth mentioning that 4 out of 5 puzzlers in this article are fixed in Scala 3. The one that remains behaves arguably as it should.