From 1aecdff470e9acc13510da622b2f15e346bb7e26 Mon Sep 17 00:00:00 2001 From: Frank Riccobono <3356896+aelfric@users.noreply.github.com> Date: Sat, 1 May 2021 13:11:19 -0400 Subject: [PATCH 1/2] Update value-classes.md --- _overviews/core/value-classes.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/_overviews/core/value-classes.md b/_overviews/core/value-classes.md index cf290987bd..e3dbe6a55b 100644 --- a/_overviews/core/value-classes.md +++ b/_overviews/core/value-classes.md @@ -13,9 +13,8 @@ permalink: /overviews/core/:title.html ## Introduction -Value classes are a new mechanism in Scala to avoid allocating runtime objects. -This is accomplished through the definition of new `AnyVal` subclasses. -They were proposed in [SIP-15](https://docs.scala-lang.org/sips/pending/value-classes.html). +First proposed in [SIP-15](https://docs.scala-lang.org/sips/pending/value-classes.html), value classes are a mechanism in Scala to avoid allocating runtime objects. This is accomplished through the definition of new `AnyVal` subclasses. + The following shows a very minimal value class definition: class Wrapper(val underlying: Int) extends AnyVal From 3eb29f183e4dd1689cac8bfc05455bb6ea01b533 Mon Sep 17 00:00:00 2001 From: Frank Riccobono <3356896+aelfric@users.noreply.github.com> Date: Sat, 1 May 2021 13:16:36 -0400 Subject: [PATCH 2/2] Update value-classes.md --- _overviews/core/value-classes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_overviews/core/value-classes.md b/_overviews/core/value-classes.md index e3dbe6a55b..f96ad46fba 100644 --- a/_overviews/core/value-classes.md +++ b/_overviews/core/value-classes.md @@ -13,7 +13,7 @@ permalink: /overviews/core/:title.html ## Introduction -First proposed in [SIP-15](https://docs.scala-lang.org/sips/pending/value-classes.html), value classes are a mechanism in Scala to avoid allocating runtime objects. This is accomplished through the definition of new `AnyVal` subclasses. +First proposed in [SIP-15](https://docs.scala-lang.org/sips/pending/value-classes.html) and introduced in Scala 2.10.0, value classes are a mechanism in Scala to avoid allocating runtime objects. This is accomplished through the definition of new `AnyVal` subclasses. The following shows a very minimal value class definition: