The Synchronous Blog

A blog about reactive programming languages.

Archive for December 2011

“Syntax Matters”

with 2 comments

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.

 

Written by francisco

December 26, 2011 at 1:55 pm

Posted in Examples

Tagged with ,

Follow

Get every new post delivered to your Inbox.