Yes. I have the impression that the representation should give the indication of the fuzzyness of the numbers. Now it would be nice that we are of a kind of fix point around this nice discussion :) From what I heard I would like to give a try to the solution proposed by nicolas and also see if we could improve the user experience. I should reread my scheme Stef
On Jul 8, 2009, at 1:31 PM, Hernan Wilkinson wrote:
So, I would like my programing language to be aware of this because most of the programers do not have such a good skill on numbers as you do, and I think programing language should be closer to people than to hardware.
As a counterexample: we readily accept that precedence rules in smalltalk are different than in mathematical notation, 1 + 2 * 3 is interpreted differently in the two notations.
So IMO we should lean towards writing programming syntax, not shoe- horning mathematical expectations in there too much. (Mainly because trying to impose mathematical notation will give wrinkling and ripping in all kinds of unexpected places in the system).
[...] and if you write 1.3, the object that represents that number is not going to be an instance of float but of scaledecimal or fraction or whatever, but not float...
That only solves the issue of representing literals because:
and all operations are made with exact representation.
cannot be done for all operations: obvious ones like square root, log, sin, etc and less obvious ones like #squared where you run out of enough bits to maintain precision (in fixed-width implementations).
R -
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project