Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update unified-types.md #3046

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update unified-types.md #3046

wants to merge 1 commit into from

Conversation

shitpoet
Copy link

Add phrase:

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

Add phrase:
> Note that `Long` to `Float` conversion is deprecated in new versions of Scala, because of the potential precision lost.
Copy link
Member

@bishabosha bishabosha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! While this is technically correct, perhaps its better to fix the example to another conversion that isn't lossy

@som-snytt
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants