[chuck-users] Fresh bug
signal.automatique at gmail.com
Mon Feb 9 16:51:44 EST 2009
> In fact, I think you can remove the % and it still blows - a pause and then
> Bus error here.
I thought I'd investigate some more and even this catches fire;
3 %=> (++count);
I tried that because admittedly the intended calculation order in
these expressions is a bit vague.
I'm not sure what proper behaviour would be here; "++count" is a bit
like a function that should return "count + 1" and clearly functions
aren't mutable but it's also a lot like a integer and that clearly is
"++count%3 => count;" is fine but is that really more readable than "3
%=> ++count;"? I'm not very happy with having to reference "count"
twice. Some might argue I should simply use two lines but this kind of
thing is such a basic operation that I'd really like to have it on one
line and in a readable form.
WWJD? (What Would Java Do?)
More information about the chuck-users