Re: [Boston.pm] Perl 6 sensitive to white space?

2016-02-18 Thread Morse, Richard E.,MGH
I know how you feel… > On Feb 17, 2016, at 7:02 PM, Greg London wrote: > > > > This is going to take some getting used to. > > > > On Wed, February 17, 2016 3:33 pm, Morse, Richard E.,MGH wrote: >> Hi! No, list context is more common. >> >> >> In particular, it

Re: [Boston.pm] Perl 6 sensitive to white space?

2016-02-17 Thread Greg London
This is going to take some getting used to. On Wed, February 17, 2016 3:33 pm, Morse, Richard E.,MGH wrote: > Hi! No, list context is more common. > > > In particular, it isn’t the comma operator. It’s (I think) the > parenthesis. > > `(123, 456)` creates a list of two elements. Lists no

Re: [Boston.pm] Perl 6 sensitive to white space?

2016-02-17 Thread Morse, Richard E.,MGH
Hi! No, list context is more common. In particular, it isn’t the comma operator. It’s (I think) the parenthesis. `(123, 456)` creates a list of two elements. Lists no longer automatically flatten (i.e., (1, (2, 3), 4) is only three elements long). If there is a space after a function call,

Re: [Boston.pm] Perl 6 sensitive to white space?

2016-02-17 Thread Greg London
So perl6 thinks it is an expression, With some kind of weird "comma" operator, Which returns a single thingy of some kind, That gets passed as a single argument to the function? What is the comma operator doing And what is the return thingy of the expression? In perl5, this would have been at

Re: [Boston.pm] Perl 6 sensitive to white space?

2016-02-17 Thread Bill Ricker
That's an ambiguous parse for 1 arg vs 2 arg form, are the parents a function call or an expression. Space disambiguates it: f( a, a2) is function, f (a, a2) is an expression whose result is passed to the function. On Wed, Feb 17, 2016 at 11:43 AM, Greg London wrote: > >

Re: [Boston.pm] Perl 6 sensitive to white space?

2016-02-17 Thread Morse, Richard E.,MGH
I’m not 100% positive, and I can’t find it immediately in the documentation, but Perl 6 is whitespace sensitive in some situations. In particular, I think that it is interpreting the extra space as making the parameter be a list of two elements. I know that parenthesis are optional in some

[Boston.pm] Perl 6 sensitive to white space?

2016-02-17 Thread Greg London
Is perl6 whitespace sensitive? Or is this a bug? I have a multi() for 1 and 2 artuments But a 2 arg call ends up getting into the wrong sub Apparently because there is a space between the sub name and the Opening parenthesis? multi mysub($arg1) { say "mysub(one): $arg1"; }