Re: the $! too global

2005-12-20 Thread Darren Duncan
Following the discussions from 2 weeks ago, are there any plans to update the synopsis soon regarding the $! variable? Synopsis 2 still says that it is conjectural to whether $! is always environmental. Thanks. -- Darren Duncan

Re: the $! too global

2005-12-08 Thread Larry Wall
On Wed, Dec 07, 2005 at 09:43:31AM +0100, TSa wrote: : HaloO, : : Larry Wall wrote: : >My gut-level feeling on this is that $! is going to end up being an : >"env" variable like $_. : : I just re-read about exceptions. Well, I undestand now that $! is : intented as a variable with a spectrum of m

Re: the $! too global

2005-12-07 Thread TSa
HaloO, Larry Wall wrote: My gut-level feeling on this is that $! is going to end up being an "env" variable like $_. I just re-read about exceptions. Well, I undestand now that $! is intented as a variable with a spectrum of meanings ranging from 1) the return value of a sub, through 2) a

Re: the $! too global

2005-12-05 Thread Larry Wall
My gut-level feeling on this is that $! is going to end up being an "env" variable like $_. (If you don't know what "env" is then you've not read the conjectural parts of S2 lately.) Then the problem reduces to what you do with an unhandled $! at the end of a lexical scope, which is probably just

Re: the $! too global

2005-12-05 Thread TSa
HaloO, Nicholas Clark wrote: No, I think not, because the closure on the last line closes over a read/write variable. It happens that read only reference to the same variable is passed into the subroutine, but that's fine, because the subroutine never writes to *its* reference. So, you argue t

Re: the $! too global

2005-12-05 Thread Nicholas Clark
On Mon, Dec 05, 2005 at 12:32:03PM +0100, TSa wrote: > HaloO, > > Luke Palmer wrote: > >The most immediate offender here is the referential passing semantics. > > IIRC, the default is to be a read-only ref. Not even local modifications > are permitted if the 'is copy' property is missing. > > >

Re: the $! too global

2005-12-05 Thread TSa
HaloO, Darren Duncan wrote: The problem is that $! is being treated too much like a global variable and not enough like a lexical variable. Consider the following example: Wasn't the idea to have $! only bound in CATCH blocks? sub foo () { try { die MyMessage.new( 'key' => 'dan

Re: the $! too global

2005-12-05 Thread Juerd
TSa skribis 2005-12-05 12:32 (+0100): > IIRC, the default is to be a read-only ref. Not even local modifications s/ref/alias/, which you can see as an implicit or automatic reference, but which we usually don't call that. Juerd -- http://convolution.nl/maak_juerd_blij.html http://convolution.nl

Re: the $! too global

2005-12-05 Thread TSa
HaloO, Luke Palmer wrote: The most immediate offender here is the referential passing semantics. IIRC, the default is to be a read-only ref. Not even local modifications are permitted if the 'is copy' property is missing. Here is a code case: sub foo ($x, &code) { &code();

Re: the $! too global

2005-12-05 Thread Luke Palmer
On 12/5/05, Darren Duncan <[EMAIL PROTECTED]> wrote: > Under the current system, a subroutine argument is an alias for the > container passed to it; The most immediate offender here is the referential passing semantics. Here is a code case: sub foo ($x, &code) { &code(); say

the $! too global

2005-12-04 Thread Darren Duncan
I've run into a problem today with my Perl 6 coding, which is due to a perceived design flaw in the current Perl 6 spec (this was discussed on #perl6 just now, mainly between myself and autrijus), so I'm bringing it up here. And yes, autrijus thinks the behaviour I'm seeing in Pugs is accordi