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
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to