Is class Foo(x: Int) extends Any okay? If so, does it box? Seems like complex rules between extends AnyVal, extends Any, extends Top
-
-
Replying to @posco @Blaisorblade and
I didn’t see any of this answered. Opaque type is much more contained and lacking most of these consistency questions.
2 replies 0 retweets 2 likes -
Replying to @posco @Blaisorblade and
The SIP still doesn't explain what happens here: (x: Unsigned) match { case y: Int => ... } I wouldn't say it "lacks consistency questions".
3 replies 0 retweets 0 likes -
Replying to @propensive @Blaisorblade and
I thought it did. I thought opaque said that is a compiler error?
2 replies 0 retweets 0 likes -
Replying to @posco @Blaisorblade and
Though what about, (x: Any) match { case y: Unsigned => ... } You can do it for `Int` so why not an opaque "Int"?
2 replies 0 retweets 0 likes -
Replying to @propensive @posco and
You can't match against abstract types, and opaque types should have similar semantics (because they're semantically the same, duh).
1 reply 0 retweets 1 like -
Replying to @Blaisorblade @propensive and
This seems a piece of evidence that opaque types might seem easy (short) but aren't simple. Good answers exist.
1 reply 0 retweets 1 like -
Replying to @Blaisorblade @propensive and
Honestly, scala already has Any, AnyRef and AnyVal. Adding Top to the mix seems like too much.
2 replies 0 retweets 3 likes -
Replying to @posco @Blaisorblade and
I know that a lot of work has already gone into an alternative top/bottom type in Nicolas Stucki's research in Phantom Types in Dotty.
2 replies 0 retweets 0 likes -
Replying to @propensive @posco and
Are there any readable conclusion on this work? What I'm sure is that having opaque types asap would be really useful everyday...
1 reply 0 retweets 0 likes
All I know comes from Nicolas's commits to his Phantom Types branch earlier in the year. Not sure of current status...
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.