Skip to content

Conversation

@eed3si9n
Copy link
Member

Ref scala/bug#10781

This is in preparation for Float range and Double range removal in 2.13.x (#6468).

Ref scala/bug#10781

This is in preparation for Float range and Double range removal in 2.13.x (scala#6468).
@SethTisue
Copy link
Member

@lrytz you want to get this into 2.12.6? I'm ambivalent.

@lrytz
Copy link
Member

lrytz commented Apr 23, 2018

If we're going to merge scala/bug#10781, then I'm in favor of shipping the deprecation with 2.12.6.

@Ichoran
Copy link
Contributor

Ichoran commented Apr 23, 2018

I am in favor since these things are fragile and should not be used. Innocuous-seeming changes can convert a "working" floating-point range into one with a (mathematical) off-by-one error.

@SethTisue SethTisue modified the milestones: 2.12.7, 2.12.6 Apr 26, 2018
@SethTisue SethTisue merged commit d7ae7a8 into scala:2.12.x Apr 26, 2018
@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Apr 26, 2018
@eed3si9n eed3si9n deleted the wip/deprecate-float-range branch April 26, 2018 18:39
@SethTisue SethTisue changed the title Deprecate Float range and Double range Deprecate Ranges of Double and Float Apr 26, 2018
@SethTisue SethTisue changed the title Deprecate Ranges of Double and Float Deprecate Double Ranges and Float Ranges Apr 26, 2018
@SethTisue SethTisue changed the title Deprecate Double Ranges and Float Ranges Deprecate floating-point Ranges Apr 26, 2018
xuwei-k added a commit to xuwei-k/scalatra that referenced this pull request May 14, 2018
scala/scala#6550

```
Welcome to Scala 2.12.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_172).
Type in expressions for evaluation. Or try :help.

scala> Range.Double.inclusive(0, 1, 0.1)
<console>:12: warning: method inclusive in object Double is deprecated (since 2.12.6): use Range.BigDecimal.inclusive instead
       Range.Double.inclusive(0, 1, 0.1)
                    ^
res0: scala.collection.immutable.NumericRange[Double] = NumericRange 0.0 to 1.0 by 0.1 (using NumericRange 0.0 to 1.0 by 0.1 of BigDecimal)

scala> res0.toList
res1: List[Double] = List(0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes worth highlighting in next release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants