scala/docs.scala-lang

The Value Classes guide should be part of the Scala Book

Opened this issue · 1 comments

We would like the Scala Book to be a complete documentation of the language.

The guide Value Classes and Universal Traits should be merged into the Scala Book. This page is specific to Scala 2 (the Scala 3 way to achieve the same result is to use opaque types) and should be labeled as such. I think a good place to put this page would be just after the Opaque Types page.

This page is specific to Scala 2 (the Scala 3 way to achieve the same result is to use opaque types)

it was suggested in #2863 (review) by @sjrd that maybe we should still port the examples to scala 3, so then maybe we would only recommend in the "motivation" to use opaque types in Scala 3