Tidy floating point literals

Let me just add that the 123. syntax isn't used universally: I'm from Denmark and there we always add a trailing 0 to floating point numbers. So a number like 1. looks a little odd to me. I believe the same applies to other European countries.

4 Likes

(1.0 isn’t even a “danish” number, it should be 1,0 then.) I really don’t think the syntax question here is split along country borders.

2 Likes

Yes, you’re correct that we use comma instead of period as the decimal point :slight_smile:

As a programmer, I’m now used to seeing things like “123.” in other programming languages, but I’ve never felt the need to write floating point numbers that way myself, even if I could. The syntax simply looks (a little) strange and inconsistent to me.

Copying large chunks of D in Rust is bad idea. But D contains several nice things, ideas and features that's unwise to reject whole as you say.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.