inessential by Brent Simmons

Strange Dialect

Nicolas Bouilleaud linked to the WebScript programming guide.

I never worked with WebScript (or WebObjects), but I find this document fascinating.

Types are not permitted — everything’s an id. There is a literal syntax for arrays and dictionaries, but only constants are permitted. And the syntax is a little different. Example: myDictionary = @{"key" = 16};.

Selectors are just quoted, as in selector:"timeOfSession".

About halfway-through there’s a section about “Modern” WebScript Syntax. (“Modern” is quoted in the original.) It’s “a variation of WebScript designed to appeal to programmers more familiar with such languages as Visual Basic and Java.” It’s weird. (To you and me.)

It does make me think — which I’ve thought before — that there’s a scripting language living inside Objective-C just waiting to get out. And then I remember that JSTalk is pretty darn close.