docs.scala-lang icon indicating copy to clipboard operation
docs.scala-lang copied to clipboard

Update unified-types.md

Open shitpoet opened this issue 1 year ago • 1 comments

Add phrase:

Note that Long to Float conversion is deprecated in new versions of Scala, because of the potential precision lost.

shitpoet avatar Jul 25 '24 18:07 shitpoet

I had to visit the web page to understand the issue. I think bishabosha's previous edit .toFloat breaks the text, which is trying to show how easy and wonderful numeric widening is. Instead, it should show the types and also trumpet Scala's "gun buy-back program" for footguns.

som-snytt avatar Aug 10 '24 02:08 som-snytt

Merging since this is strictly an improvement, but it would be nice if a volunteer improved it further, as per above discussion.

SethTisue avatar Oct 26 '24 19:10 SethTisue