4 ms·
Many of these criticisms seem to be compiler specific rather than language specific (perhaps with the exception of the os example). * I like knowing explicitly
by droz 15y ago
Many of these criticisms seem to be compiler specific rather than language specific (perhaps with the exception of the os example).
* I like knowing explicitly what kind of integers I'm working with and plan on using the full 32 or 64 bits available to me.
* IEEE floating point issues will be around forever. If you want something more precise, store the numerator and denominator, or factorization.
* foldr doesn't have to be implemented recursively.
- nwhitehead 15y agoThe IEEE problems are actually specific to x87 and the fact that x87 has extended precision in registers and single/double precision in memory. So your result can depend on whether the compiler spilled intermediate calculations to memory or kept them in registers. Luckily SSE doesn't have this issue. You get single or double precision consistently. IEEE actually gives a consistent functional specification for arithmetic that fits purely functional programming pretty well.