in reply to Re: Re: Re: Re: Perl6 syntax being too much complex? How we will teach and read that?!
in thread Perl6 syntax being too much complex? How we will teach and read that?!

NB: probably your * is redundant, since any() will expect a list.

I had any(@foo, @bar).length == 3 in mind. Does that need explicit references too @foo and @bar then?

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

  • Comment on Re: Re: Re: Re: Re: Perl6 syntax being too much complex? How we will teach and read that?!
  • Download Code

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Perl6 syntax being too much complex? How we will teach and read that?!
by TimToady (Parson) on Mar 22, 2004 at 20:27 UTC
    I suspect so. any(@options) will be a pretty widespread idiom that we need to support, and I'm leary of autodereferencing an array merely because it's the only argument. I think people will be expecting a flattening context such that any(1,2,3,@many) works.

      I think people will be expecting a flattening context such that any(1,2,3,@many) works.

      Just when I thought things were getting easier with explicit flattening, I learn about 'flattening context'. I'm a bit disappointed, but fortunately there are still many other things to be happy about.

      Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

        Er, by "flattening context" I mean good old-fashioned list context, that's all. (Perl 6 can have lists of scalars that don't flatten--that's the complication.) I was trying to be clearer, and ended up making things muddier. Sorry.