Incremental IF statement

July 26, 2007

I’ve been thinking more about programming languages for children. It appears these languages attempt to make normal programming control constructs appear slightly less nerdy, but it really has the same behavior. For example, you must specify all the branches for an IF statement at development time, which requires kids to consider all possibilities up front. That might be difficult for a 5 year old. One idea I’ve been thinking about (for a while, actually) is an incremental IF that can be dynamically extended at runtime. For example, you can type in the statement “if (x < 10) then doX()” and run the program in incremental development mode. The program runs normally unless it hits this line with x >= 10. Then the program will ask the user what it should do in this case. You can type in a new behavior “doY()”, or you can enter a new IF-THEN clause. The program adds this to the program and continues execution. People do this anyway with edit-compile-debug cycles or rapid prototyping in an interpreter. But that’s too tedious and difficult for children and other non-programmers. Now how can I make loops incremental, too?

Advertisements

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: