Skip to content

Commit fb8da46

Browse files
authored
Merge pull request scala/scala#10971 from coreyoconnor/remove-2-10-references
doc: remove 2.10 references in library docs
2 parents 7832a06 + d46e341 commit fb8da46

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

library/src/scala/AnyVal.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ package scala
2929
* - The ''integer types'' include the subrange types as well as [[scala.Int]] and [[scala.Long]].
3030
* - The ''floating point types'' are [[scala.Float]] and [[scala.Double]].
3131
*
32-
* Prior to Scala 2.10, `AnyVal` was a sealed trait. Beginning with Scala 2.10,
33-
* however, it is possible to define a subclass of `AnyVal` called a ''user-defined value class''
34-
* which is treated specially by the compiler. Properly-defined user value classes provide a way
32+
* A subclass of `AnyVal` is called a ''user-defined value class''
33+
* and is treated specially by the compiler. Properly-defined user value classes provide a way
3534
* to improve performance on user-defined types by avoiding object allocation at runtime, and by
3635
* replacing virtual method invocations with static method invocations.
3736
*

library/src/scala/Dynamic.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ package scala
3030
* foo.arr(10) ~~> foo.applyDynamic("arr")(10)
3131
* }}}
3232
*
33-
* As of Scala 2.10, defining direct or indirect subclasses of this trait
33+
* Defining direct or indirect subclasses of this trait
3434
* is only possible if the language feature `dynamics` is enabled.
3535
*/
3636
trait Dynamic extends Any

library/src/scala/math/Ordering.scala

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,15 @@ object Ordering extends LowPriorityOrderingImplicits {
382382

383383
/** `Ordering`s for `Float`s.
384384
*
385-
* The behavior of the comparison operations provided by the default (implicit)
386-
* ordering on `Float` changed in 2.10.0 and 2.13.0.
385+
* The default extends `Ordering.Float.TotalOrdering`.
386+
*
387+
* `Ordering.Float.TotalOrdering` uses the `java.lang.Float.compare` semantics for all operations.
388+
* Scala also provides the `Ordering.Float.IeeeOrdering` semantics. Which uses the IEEE 754 semantics
389+
* for float ordering.
390+
*
391+
* Historically: `IeeeOrdering` was used in Scala from 2.10.x through 2.12.x. This changed in 2.13.0
392+
* to `TotalOrdering`.
393+
*
387394
* Prior to Scala 2.10.0, the `Ordering` instance used semantics
388395
* consistent with `java.lang.Float.compare`.
389396
*
@@ -394,11 +401,6 @@ object Ordering extends LowPriorityOrderingImplicits {
394401
* `false` thus `0.0F < Float.NaN`, `0.0F > Float.NaN`, and
395402
* `Float.NaN == Float.NaN` all yield `false`, analogous `None` in `flatMap`.
396403
*
397-
* Recognizing the limitation of the IEEE 754 semantics in terms of ordering,
398-
* Scala 2.13.0 created two instances: `Ordering.Float.IeeeOrdering`, which retains
399-
* the IEEE 754 semantics from Scala 2.12.x, and `Ordering.Float.TotalOrdering`,
400-
* which brings back the `java.lang.Float.compare` semantics for all operations.
401-
* The default extends `TotalOrdering`.
402404
*
403405
* {{{
404406
* List(0.0F, 1.0F, 0.0F / 0.0F, -1.0F / 0.0F).sorted // List(-Infinity, 0.0, 1.0, NaN)

0 commit comments

Comments
 (0)