Re:Go 1.13 Release Notes
by masklinn on Wednesday September 04, 2019 @05:18AM
(#20875382)
> Not in Go.
Yes in go. `var u = 1e7` gives a float. That means 1e7 is a float literal. You can coerce it to an integer by explicitly typing the target, but it's still a float literal.
Yes in go. `var u = 1e7` gives a float. That means 1e7 is a float literal. You can coerce it to an integer by explicitly typing the target, but it's still a float literal.