On Wed, 09 Aug 2000, Bart Lateur wrote:
> On Wed, 9 Aug 2000 09:11:55 +0100 (BST), Nick Ing-Simmons wrote:
>
> >> @foo = @bar * 12;
> >
> >I like it.
>
> >It is pretty obvious what above should do:
> >
> >@foo = ();
> >foreach my $elem (@bar)
> > {
> > push(@foo,$elem * 12);
> > }
>
> @foo = map { $_ * 12 } @bar;
>
>
> I don't see the need for a new notation.
Depends on how often it's used, I guess. After all, Perl is just new
notation for C. :-)
It would also potentially add much happiness and confusion with other
operators that work on lists.
For instance,
chomp(@strings);
@strings .= " tag this onto every string";
(I've had many potential perlers ask why that doesn't work. To them,
it seems intuitive with the rest of the language.)
--
Bryan C. Warnock
([EMAIL PROTECTED])
- Re: PDL-P: Re: Hooks for array notation (was Re: Ramblin... Dan Sugalski
- Re: PDL-P: Re: Hooks for array notation (was Re:Rambling... Karl Glazebrook
- sorted sparse containers (was Re: PDL-P: Re: Hooks for a... David L. Nicol
- Re: sorted sparse containers (was Re: PDL-P: Re: Hooks f... Bryan C . Warnock
- Re: sorted sparse containers (was Re: PDL-P: Re: Hooks f... Dan Sugalski
- Re: Ramblings on "base class" for SV etc. Dan Sugalski
- vector and matrix calculations in core? (was: Re: Rambli... Bart Lateur
- Re: vector and matrix calculations in core? (was: Re: Ra... Dan Sugalski
- Re: vector and matrix calculations in core? (was: Re: Ra... Bart Lateur
- Re: vector and matrix calculations in core? (was: Re: Ra... Nick Ing-Simmons
- Re: Ramblings on "base class" for SV etc. Bryan C . Warnock
- Re: Ramblings on "base class" for SV etc. Dan Sugalski
- Method call optimization. Nick Ing-Simmons
- Re: Method call optimization. Chaim Frenkel
- Re: Method call optimization. Dan Sugalski
- Re: Method call optimization. Joshua N Pritikin
- Re: Method call optimization. Dan Sugalski
- Re: Method call optimization. Graham Barr
- Re: Method call optimization. Chaim Frenkel
- Re: Method call optimization. Graham Barr
- Re: Method call optimization. Chaim Frenkel
