I’ve written the second post in my series on trying to achieve platform dependent types in Scala 3: Crossing those hills
In this post, I explore opaque types, union types as context, type classes with path dependent types, and more.
I’ve written the second post in my series on trying to achieve platform dependent types in Scala 3: Crossing those hills
In this post, I explore opaque types, union types as context, type classes with path dependent types, and more.
This isn’t the exact same goal but has some overlap: Creating types that represent native types - but for emulated systems. You might find the parallels interesting:
Yes, there’s a lot of functionality here that I would want to implement for my platform dependent types. The problem comes from making those types:
I’m working on the third blogpost now, which goes over adding some of the operations you listed to CLong
in a type-safe way, and the problems I encounter there.
One note about opaque types: i needed to use scala 3.4 for those definitions to work as expected. Otherwise the type checking was a bit confused.
I’m probably going to be developing with 3.4 in general, but in my use case so far I’ve been on 3.3.1. I’ll keep an eye out for that though!