Not sure why I care, but here is my 2 cents: int is not float, float is not int, and implementing the auto-int-to-float conversion in many operators was a mistake that I wouldn't repeat if I were to design a language again.
/ Fredrik (Naranek) Hubinette (Real Build Master)
Previous text:
2003-09-16 02:58: Subject: Re: float type weirdness
Ok, one last answer before I do something useful...
I don't like the idea of arbitrary (compiler/interpreter decision) conversion between numeric types in case when performance matters.
We've discussed this topic before with you. A compiler/interpreter decision is not arbitrary but rule based. If you know the rules you know exactly what happens. Pike is however a high level language, which means that you should not need to learn the rules in normal cases. The goal for us as developers of the langauge Pike is to make the rules soo good that developers in Pike never faces a situation where it is needed to learn the underlying rules.
Ints are faster than floats, but floats are fast enough too, while Gmp objects are extremely slow comparing to both ints/floats.
This is true if you own an Atari. Modern CPUs has a floating point operation pipeline right next to the integer one.
Actually, even implicit bignums in Pike slow down things significantly -
That has never been under dispute. Of course bignums are slower; they perform a larger task.
Even Touring computer can do everything
It's Turing machine, after Alan Turing.
Same with Lisp - it is good for specific, but not general programming, especially for (former) C programmers (while Pike is promoted as "similar to C/C++").
There is no problem in using Lisp for general programming. I made a multithreaded, object oriented adventure game in Lisp once. Someone else made emacs. That is however beside the point. You can't convince us that Pike isn't a lot like Lisp.
Not at all. Pike is much more similar to Lisp than it is to C in several fundamental ways.
For instance?
Typed values. Garbage collection. Neither is in C++.
Two numeric types are also comparable if we won't take precision into account. Actually, the only difference between int and float is exactly the "floating point", managed by exponent part, but this is implementation detail.
Am I right in that you don't know how IEEE floating point numbers are actually represented, technically?
/ Martin Nilsson (saturator)