News for hackers. Stuff that matters.
Re:Move Lang by loup-vaillant on Monday March 14, 2011 @06:46AM (#2321973)
The syntax is more cumbersome than actually needed. It probably should use mandatory indentation as well. We lovers of curly brackets may not like that, but it makes things easier for beginners.[1] In this case, the first listing would have looked like that:

    hello = ^name -> "Hello " + name
    repeat {times: 3}
      print hello {name: "John"}
Or, without the keyword arguments:

    hello = ^name -> "Hello " + name
    repeat 3
      print hello "John"
(the last line is meant to be a function. Indentation is used instead of ^{}) Note that for a syntax that use juxtaposition for function application, I was very surprised to see that

    print hello "John"
    
    ==  print (hello "John")
    !=  (print hello) "John"
It looks like a misfeature (doesn't work well with currying), but maybe there's some justification?

(Edit: the language does look very simple, and I like that. Very good for "I'll show you programming in 10 minutes". For that purpose, fixing the syntax would make it even better.)

[1]: http://okasaki.blogspot.com/2008/02/in-praise-of-mandatory-i...

There are no comments on this comment yet.