3 ms·
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
by latch 16y ago
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?
- rimantas 16y agoWell, 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…
- bergie 16y agoThe 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")