“Syntax Matters”
Compare the following code with the one in the previous post (they do the same thing):
parallel/or do
loop do
await 250ms;
emit Leds_led0Toggle();
end;
with
loop do
await 500ms;
emit Leds_led1Toggle();
end;
with
loop do
await 1000ms;
emit Leds_led2Toggle();
end;
end;
I realized that syntax really matters after teaching Céu as an alternative to nesC in two courses this year.
The new syntax is more verbose and less flexible, but way more readable.
Advertisement
Definitely better. I don’t think “make it English” is always the answer, but the previous version had a lot in common with regular expressions.
Tom
December 26, 2011 at 11:28 pm
Tom, thanks for the feedback!
Very interesting blog you have, I remember having read a ChucK paper in the past.
francisco
January 5, 2012 at 4:24 pm