0:00 / 0:00
#valueclasses#opaquetypes#scala3
Value Classes in Scala | Rock the JVM
Rock the JVM
27K subscribers • 62 videos on Hallway
- Recommended by 1 person: 1 in engineering communities.
- Linked in the descriptionestatico/scala-newtype
Intermediate. Assumes working knowledge.
5.5K views5 years ago1 recommendation
Programming languagesSystems programmingScalaPerformance and optimization
An explanation of value classes in Scala, their performance trade-offs, and how Scala 3 addresses these issues with opaque types.
Written version: blog.rockthejvm.com/value-classes/ Content referred to in this video: Opaque types in Scala 3: youtube.com/watch?v=8-b2AoctkiY Cats: rockthejvm.com/p/cats Check out newtypes: github.com/estatico/scala-newtype This is a video for more experienced Scala programmers. We'll solve a type of bugs which are easy to miss and hard to trace. We'll discuss the need for value classes, the pros and cons with respect to performance, then we'll look at a library which solves the problem with minimal overhead in Scala 2. Finally, we'll see how Scala 3 comes up with a language-level feature for this problem, in the form of opaque type aliases. Follow Rock the JVM on: LinkedIn: linkedin.com/company/rockthejvm Twitter: twitter.com/rockthejvm Blog: rockthejvm.com/blog ------------------------------------------------------------------------- Home: rockthejvm.com -------------------------------------------------------------------------Why it's here
1 person recommends thisWhat people say. Recommended as a clear explanation of Scala value classes and their Scala 3 alternatives.