[chuck] (no subject)
gewang at CS.Princeton.EDU
Thu Feb 17 17:36:31 EST 2005
>> a/b::second => dur q;
>> gives a parse error however.
> Have you tried (a/b)::second => dur q; ? I've noticed that the parser
> is VERY nitpicking on arithmetic before the ::....
This is an issue with operator precedence - currently the :: is
resolved before arithmetic, to enable things like:
now + 2::second => time later;
10::second / 5::second => float ratio;
the problem is
will result in a type error - this expression is parsed as (4) /
(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...
More information about the chuck