
17 Feb
2005
17 Feb
'05
6:27 p.m.
On Thu, 17 Feb 2005, Ge Wang wrote:
This is an issue with operator precedence - currently the :: is resolved before arithmetic, to enable things like:
now + 2::second => time later;
and
10::second / 5::second => float ratio;
the problem is
4/2::second
will result in a type error - this expression is parsed as (4) / (2::second)...
(4/2)::second is currently the way to evaluate 4/2 first before ::second, as Mikael noted.
We have yet to find a good balance for this part of the grammar...
Thanks to Ge and everyone else for the clarification. michael