Some notes: - yes, it fails if I try to assign numbers other than 110 - compilation is fast - no, it doesn't work for products greater than 10x11
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Curious... was wondering if the extra Scala type-system level stuff can replace the `refined` library, or at least cover some of its functionality.
-
I probably don't know everything Refined can do, but a lot of its functionality becomes easier and more natural to implement in Scala 3. But I think there's still room for a library like Refined that would make these capabilities more accessible. /cc
@fst9000
End of conversation
New conversation -
-
-
That's actually excactly how I tried to implement them at first, but as you note, it doesn't scale well, so we ended up internalizing the implementation in the compiler. Do you think we could / should do a better job of explaining this in the docs? https://dotty.epfl.ch/docs/reference/metaprogramming/inline.html#the-scalacompiletimeops-package …
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
It's that package on Scala 3? I thought there would be little in terms of changes to stdlib.
-
This is my own code. Both + and * are defined for type-level Ints in the standard library, with fast implementations that just operate on the integers as numbers, but my implementations show that it's completely possible to build these using just the successor type (S[n]).
- Show replies
New conversation -
-
Show additional replies, including those that may contain offensive content
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.