Written version: https://blog.rockthejvm.com/value-classes/
Content referred to in this video:
Opaque types in Scala 3: https://www.youtube.com/watch?v=8-b2AoctkiY
Cats: https://rockthejvm.com/p/cats
Check out newtypes: https://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: https://linkedin.com/company/rockthejvm
Twitter: https://twitter.com/rockthejvm
Blog: https://rockthejvm.com/blog
-------------------------------------------------------------------------
Home: https://rockthejvm.com
-------------------------------------------------------------------------