in reply to Re^2: print list, comma not working?
in thread print list, comma not working?

You incorrectly assume that the list operator is only used in void context when that's rarely the case. You're advocating that
foo(bar('x'), 'y');
should mean
foo(bar('x', 'y'));

Needless to say, I disagree.

In Perl6, whitespace between the function name and the parens will cause the parens to be treated as part of the argument, not part of the function call.

It's rather impossible to change that in Perl5, assuming it's ever desirable. If you're going to omit the parens around a function call, expect problems. But if you make sure that the first argument doesn't start with a paren, you'll avoid most of them.

Replies are listed 'Best First'.
Re^4: print list, comma not working?
by fzellinger (Acolyte) on Jan 13, 2010 at 05:02 UTC
    Good counter-example. I guess I was implicitly assuming that the whitespace between the function name and open-parens was affecting the behaviour, which you are indicating is the correct assumption in Perl6?

    I'll definitely cut back on my use of functions without parens.