Thursday, December 20, 2007

Scheme Recommendation From Google

OK, perhaps I'm exaggerating a bit. But check out what the Google Calendar API Dev Guide has to say about programming with their API:

To add a new entry, you create the entry using the client library's classes and methods, then call the feed.insertEntry() method to send the new entry to the service. Again you provide a continuation function, which the service calls when the entry has been successfully added.

If you're new to JavaScript, the control flow may be a little confusing. After calling a method like getEventsFeed() or insertEntry(), in most cases your script ends. Execution resumes in the continuation function when the service returns the requested data. Therefore, anything that your client does to the returned data should be done in the continuation function, or called from that function. You may need to make some variables global in order to use them in multiple functions.

For more information about this style of programming, see "Continuation-passing style" in Wikipedia.

And which language should you use to learn about Continuation Passing Style? Why Scheme of course. Even the Wikipedia article gives its examples in terms of Scheme.

So if you want to be a JavaScript hacker, you should learn Scheme.

Like I said, a recommendation to learn Scheme from our good friends at Google.

I think Scheme should rebrand its marketing effort: Scheme: the JavaScript of the server side.

1 comment:

  1. Anonymous7:23 AM

    Douglas Crockford, one of the biggest Javascript gurus out there, has been saying this for a while now.

    ReplyDelete