At 01:55 PM 8/9/00 +0200, 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. Well, compactness for one. With a scalar on one side it's less odd (it was a bad example). When funkier, though: @foo = @bar * @baz; the expansion becomes less obvious and quite a bit larger, especially if the arrays are multidimensional. Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk
- Re: Hooks for array notation (was Re: Ramblings on "... Jeremy Howard
- Re: Hooks for array notation (was Re: Ramblings on "... Dan Sugalski
- Re: PDL-P: Re: Hooks for array notation (was Re: Ramblin... Karl Glazebrook
- Re: PDL-P: Re: Hooks for array notation (was Re: Ramblin... Dan Sugalski
- Re: PDL-P: Re: Hooks for array notation (was Re: Ramblin... Karl Glazebrook
- 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
- vector and matrix calculations in core? (was: Re: Rambli... 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