in reply to Re^2: What's wrong with Perl 6?
in thread What's wrong with Perl 6?
And while we are in the maybes
- Maybe Ruby will get a little bit more clever in letting me spread a statement over several lines without jumping through hooooooops that much.
prints 3. That's kinda what I'd expect from a language that more or less uses the newline character as the statement terminator. But even
x = 1 + 2
prints 3. (Sorry? How???)
x = (1 + 2
on the other hand errors out with "syntax error, unexpected tUPLUS, expecting ')'". Lovely. Choose between
the two ugly options
x = foo(1 + 2
x = foo(1 + 2 +
x = foo(1 + 2 \
- Maybe sometime in the future it will get sensible error messages. "unexpected tUPLUS"? What the f..k? And that's one of the least cryptic I've seen.
- Maybe in a few years the Ruby folk gets through the discussion that was hot in the Perl community some eight years ago and add variable declaration and use strict. (There is currently no way to know whether an "x" used in a block is a new local one or shared with a bigger scope. And no way to specify that. And to make things more interesting the locality of the block parameters is currently context dependent, in the upcomming version they will always be local. Sweet.) Currently all you get is a runtime check that the first thing you do to a variable is some kind of assignment.