Justin du Coeur (jducoeur) wrote,
Justin du Coeur
jducoeur

Gratuitous Syntax

Pardon a brief rant:

Why is it, that every time someone comes up with an interesting new idea for a language, they decide to introduce a lot of new syntax to go along with it?

My new language of the day is Carnap, which is somewhat intriguing -- yet another language trying to deal with the multi-core programming problem. (Probably not as good as Fortress, which is my current yardstick, but I'm keeping my mind open.) But when I look at a Carnap program -- for instance, their Sieve of Eratosthenes example -- I am left with a bit of head-scratching. Bits of Pascal, bits of standard lambda-expression syntax, but also a good deal of Just Plain Odd, which introduce an unnecessary barrier to entry. Given the number of languages I speak, it's kind of unusual for me not to be able to immediately grok a program.

Granted, it's an easy trap to fall into: I've done it myself many times, usually when I'm whipping up some syntax for an internal language for some project. (God knows the syntax for ProWiki is no clearer.) But when I want people other than me and maybe my group to take it seriously, I do try to reduce the gratuitous eccentricity, specifically to reduce the learning curve. This is actually one of the things I most like about Fortress: it's innovative as hell, but they made a significant effort to create a syntax that makes intuitive sense, blending fairly conventional programming languages with standard math. Despite an explicit mandate to not get tied down to back-compatibility, it still makes a lot of sense.

It's worth keeping in mind, especially if you find yourself coming up with little languages. If there's any chance that you'll want others to pay attention to them, try to minimize the weirdness. There may be places where you need to invent syntax, and that's fine, but where you're doing something relatively conventional, you're likely to have best success by adapting from one of the numerous examples already out there, that folks already know...
Tags: programming
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 4 comments