PROPOSAL: Implicit conversions of integer literals to floating point

so so at so.do
Thu Dec 30 13:18:00 PST 2010


>> But people don't expect 1/2 to return 0.5000 and D isn't C++
>
> There are languages that have had to wait for a major language update to  
> reach that:
> http://ideone.com/YdFbl

I am not familiar with Python and its community, but such a change in a  
language even in a major update... great work!

> While other ones have gotten it right from the beginning (Scheme  
> numerical tower is well designed):
> http://ideone.com/q2Hot

 From the example, looks like it evaluates integer divisions to rational  
numbers while real numbers output real numbers.
This wouldn't work on a language like D.

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/


More information about the Digitalmars-d mailing list