Posted Dec 9, 2008 13:12 UTC (Tue) by khim (subscriber, #9252)
[Link]
That's two cases I knew as well. But in both SQL and C disaster is
localized: in SQL you can use "NOT NULL" mark to make sure there will be no
NULL in the column, in C you can avoid floating point altogether (and
floating point numbers are anomany in many other reasons). In PHP there are
no simple rule to avoid this.
Actually all languages can be marked as "nice", "bad, but unavoidable"
and "bad AND avoidable". Python and Java are first (they do have problems
but overral they are "nice"), C/SQL/JavaScript are second (have nasty
surprises but almost impossible to avoid in practice) and PHP is in the
last category.
Good answer
Posted Dec 10, 2008 11:17 UTC (Wed) by ballombe (subscriber, #9523)
[Link]
Why special casing C over this ? The IEEE754 standard is not C specific, other languages support it (C++, etc) and have the exact same issue.
In the end it is more of a hardware issue (if you want to use the FPU of your machine in a portable way, you have to deal with IEEE754 semantic).