in reply to 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?!

Or, the non-hardcoded version ...

Which sometimes is handy, sometimes not. In any case, this kind of ugly lookup hashes is no longer needed in Perl 6, as any(*@array) will DWYM.

$isAcceptable{$foo}

You mean %isAcceptable{$foo}. $foo{$bar} is $foo.{$bar} ($foo->{bar} in Perl 5).

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

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

Replies are listed 'Best First'.
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 18:00 UTC
    NB: probably your * is redundant, since any() will expect a list.

      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' }

        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.