3 ms·
> you can have the same problem in type-safe language Yes, you can. But at least you have a better option and better chance of other people using it, so stati
by fiedzia 10y ago
> you can have the same problem in type-safe language
Yes, you can. But at least you have a better option and better chance of other people using it, so statistically you'll have less errors.
> do not use builtin operators in C for that
No, do not add another rule to a million of rules people have to already follow, make compiler worry about enforcing that, not developer.
- mikulas_florek 10y ago> Yes, you can. But at least you have a better option and better chance of other people using it, so statistically you'll have less errors. I highly doubt that this specific bug would not happen in any typesafe language. The only way I see this not happening is if there is no native float-like type. Is there such language? They could have make it safe in C, and they did not, probably because it's convenient to use float. > No, do not add another rule to a million of rules people have to already follow, make compiler worry about enforcing that, not developer. It can be implemented in C so it's forced by compiler.