Re: [nice2haveit]: transpose function

2001-07-25 Thread Jeremy Howard
David L. Nicol <[EMAIL PROTECTED]> wrote: > Yes, exactly. I would like to have a transpose operator, which > will work on a list of hash refs, so this: > > $solids = [1..7]; > $stripes = [9..15]; > foreach (transpose($solids,$stripes)); > print "the $_->[0] ball is the same color as the $_->[1]\

Re: nice2haveit

2001-07-17 Thread Dan Sugalski
At 05:10 AM 7/17/2001 +, Mark Morgan wrote: >Raptor <[EMAIL PROTECTED]> wrote: > > I mean something like this : > > > instead of : > > #$Request->{Params} > > local *myhash = \%{$$Request{Params}}; > > > my %myhash alias %{$$Request{Params}};#see - it is my (now as far as I know > > u can't ha

Re: nice2haveit

2001-07-17 Thread Mark Morgan
Raptor <[EMAIL PROTECTED]> wrote: > I mean something like this : > instead of : > #$Request->{Params} > local *myhash = \%{$$Request{Params}}; > my %myhash alias %{$$Request{Params}};#see - it is my (now as far as I know > u can't have it 'my') You don't need a typeglob there; you can do the fo

Re: nice2haveit

2001-07-16 Thread Paul Johnson
On Mon, Jul 16, 2001 at 03:37:41PM -0500, David L. Nicol wrote: > Uri Guttman wrote: > > > one related point is that this symbol table will be accessible via > > caller() so you could access/install lexical symbols in a parent block > > on the call stack. scary! > > > > uri > > We must demand t

Re: nice2haveit

2001-07-16 Thread Dan Sugalski
At 03:37 PM 7/16/2001 -0500, David L. Nicol wrote: >Uri Guttman wrote: > > > one related point is that this symbol table will be accessible via > > caller() so you could access/install lexical symbols in a parent block > > on the call stack. scary! > >We must demand that the feature come with a wa

Re: nice2haveit

2001-07-16 Thread John Porter
Uri Guttman wrote: > one related point is that this symbol table will be accessible via > caller() so you could access/install lexical symbols in a parent block > on the call stack. scary! Quite. Does anyone have a pointer to tchrist's rant on Tcl's upvar? -- John Porter

Re: nice2haveit

2001-07-14 Thread Brent Royal-Gordon
> > $Foo::{'$bar'} = \$baz; # Alias $Foo::bar to $baz > > Are we back to "globals only"? What about lexical aliases? Something > like: > > my \%foo = \%bar; I've always wondered why the backslash operator wasn't lvaluable. (IIRC, C++'s & operator is semi-lvaluable.) IM(V)HO

Re: nice2haveit

2001-07-14 Thread Uri Guttman
> "BL" == Bart Lateur <[EMAIL PROTECTED]> writes: BL> On Fri, 13 Jul 2001 20:55:07 +1000 (EST), Damian Conway wrote: >> Would you like to clarify what you mean here. >> Are you talking about typeglob assignments? >> Perl 6 will have: >> >> $Foo::{'$bar'} = \$baz;# Ali

Re: nice2haveit

2001-07-14 Thread Bart Lateur
On Fri, 13 Jul 2001 20:55:07 +1000 (EST), Damian Conway wrote: >Would you like to clarify what you mean here. >Are you talking about typeglob assignments? >Perl 6 will have: > > $Foo::{'$bar'} = \$baz; # Alias $Foo::bar to $baz Are we back to "globals only"? What about lexical alia

Re: nice2haveit

2001-07-13 Thread raptor
> Yes but can't the same be accomplished with... > > my $myhash = (%{$Request->{Params}}); > print $myhash{abc}; > > Though again it copies the structure, I don't see how dereferencing can be > unclear? ]- if u have someting like this anything u can remove in some way is worth it:)) $tables{

RE: nice2haveit

2001-07-13 Thread Sterin, Ilya
3/01 12:24 PM Subject: Re: nice2haveit the structure is something like this : $Request = { Params => { abc => 1, ddd => 2 } } the idea is that U don't dereference i.e. : my $myhash = ($Request->{Params}); if u want to use it U have to do this

Re: nice2haveit

2001-07-13 Thread Dan Sugalski
At 09:24 PM 7/13/2001 +0300, raptor wrote: >in the case of : > >local *myhash = \%{$Request->{Params}}; >u do this : > >print $myhash{abc}; > >so it is first clearer and second I hope much faster Clearer maybe, faster probably not appreciably. Regardless, the lexical 'symbol table' will be

Re: nice2haveit

2001-07-13 Thread raptor
the structure is something like this : $Request = { Params => { abc => 1, ddd => 2 } } the idea is that U don't dereference i.e. : my $myhash = ($Request->{Params}); if u want to use it U have to do this : print $$myhash{abc}; #or if u preffer print $myhash

RE: nice2haveit

2001-07-13 Thread Sterin, Ilya
-Original Message- From: raptor To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 7/13/01 10:19 AM Subject: Re: nice2haveit >> Two things i think is good to have it : >> >> 1. ALIAS keyword. >> - first reason is 'cause many people don'

Re: nice2haveit

2001-07-13 Thread raptor
>> Two things i think is good to have it : >> >> 1. ALIAS keyword. >> - first reason is 'cause many people don't know that this is possible.. at >> least any newscommer and it will help not to forgot that it exist :"). >> - Code become more readable. >> - can be Over

Re: nice2haveit

2001-07-13 Thread Damian Conway
> Two things i think is good to have it : > > 1. ALIAS keyword. > - first reason is 'cause many people don't know that this is possible.. at > least any newscommer and it will help not to forgot that it exist :"). > - Code become more readable. > - can be Overloaded >