The Synchronous Blog

A blog about reactive programming languages.

“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.

 

Advertisements

Written by francisco

December 26, 2011 at 1:55 pm

Posted in Examples

Tagged with ,

2 Responses

Subscribe to comments with RSS.

  1. 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

  2. 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


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: