News for hackers. Stuff that matters.
Re:Move Lang by kqueue on Monday March 14, 2011 @03:47AM (#2321685)
hello = ^(name){ "Hello "+name } repeat {times: 3} ^{ print hello {name: "John"} }

The syntax makes no sense. How can this be aimed towards people not previously familiar with programming computers?

And how can this be considered intuitive?

>When creating a function, we can specify function arguments, which are sorrounded by parentheses and put in between the "^" and the "{". These "arguments" are just like variables, but which are only available inside our function.

What's wrong with python for newbie programmer?

Re:Move Lang by exit on Monday March 14, 2011 @04:22AM (#2321751)
the code you pasted was presented on 3 lines originally:

hello = ^(name){ "Hello "+name }

repeat {times: 3} ^{

  print hello {name: "John"}
}

what doesn't make sense about it? it clearly does make some kind of sense since move has a working parser.

> What's wrong with python for newbie programmer?

nothing wrong with it, but nothing demanding it either.

i use python daily and wish it had anonymous function constructions, like javascript or, apparently, move. i think it's healthier for new programmers to appreciate code as data as soon as possible.

Re:Move Lang by endtime on Monday March 14, 2011 @04:48AM (#2321792)
>i think it's healthier for new programmers to appreciate code as data as soon as possible.

Disagree. It's important for new programmers to feel comfortable and not confused. Code as data is a relatively overwhelming concept and I don't see any benefit to introducing to someone who doesn't even know the basics yet.

I do wish Python had real anonymous functions too - I use them all the time in CoffeeScript - but I don't think their absence makes Python a worse languages for beginners.

Re:Move Lang by latch on Monday March 14, 2011 @04:41AM (#2321781)
Maybe it's because we know how to program, but I agree that the syntax looks confusing/poor. But then, the example is confusing. Why are we building a function for what should ultimately be:

do three times print "Hello John end

I guess my point is that, if the goal is to target new developers, why show "advanced" topics (like method) for an example that doesn't even need it?

Re:Move Lang by rimantas on Monday March 14, 2011 @05:15AM (#2321836)
Well, in Ruby:

  3.times do
    puts "Hello John"
  end
Or

  greeter = lambda {|name| 3.times { puts "Hello " + name}}
  greeter.call "John"
Not sure, what Move offers there…
Re:Move Lang by bergie on Monday March 14, 2011 @05:19AM (#2321839)
The CoffeeScript example would be:

    for number in [1..3]
        console.log "Hello, John"
Again, quite a bit simpler than Move. And runs everywhere with a browser :-)

...and if you want to do it exactly as in the example, then:

    hello = (name) -> "Hello, #{name}"
    for number in [1..3]
        console.log hello("John")