Re: Autovivi

2002-08-14 Thread Leopold Toetsch
Uri Guttman wrote: [ CCs stripped ] ... what if you passed \$a{llama}{alpaca}? even as a read only param, you could deref later through the ref in another sub that gets passed it from this sub. If I understand Dan's proposal (a05111b55b977c7a65606@[63.120.19.221]) for a change in the

Re: Autovivi

2002-08-14 Thread [EMAIL PROTECTED]
From: Larry Wall [EMAIL PROTECTED] Perhaps there should be a way to declare a parameter to be pass-by-value, producing a modifiable variable that does not affect the caller's value. But I'm not sure saving one assignment in the body is worth the extra mental baggage. and later he

RE: Autovivi

2002-08-14 Thread Brent Dax
[EMAIL PROTECTED]: # Resolution: Use whatever default seems good, but provide the # freedom to get pass-by-value-modifiable, perhaps something like this: # # sub mysub ($name is m, $email is m) { ... } Of course! This *is* Perl after all--did you ever doubt that we would give you all

Re: Autovivi

2002-08-14 Thread Luke Palmer
From: Larry Wall [EMAIL PROTECTED] The default is pass-by-reference, but non-modifiable. If there's a pass-by-value, it'll have to be specially requested somehow. This is a minimal difference from Perl 5, in which everything was pass-by-reference, but modifiable. To get pass-by-value,

RE: Autovivi

2002-08-14 Thread David Whipp
Luke Palmer wrote: Since variables are copy-on-write, you get the speed of pass-by-reference with the mutability of pass-by-value, which is what everyone wants. If you have this, why would you want to do enforced const reference? That's not rhetorical; I'm actually curious. One reason I