Re: 'my' doesn't totally isolate
From: Uri Guttman (uri_at_stemsystems.com)
Date: 06/11/04
- Next message: Purl Gurl: "Re: 'my' doesn't totally isolate"
- Previous message: Uri Guttman: "Re: 'my' doesn't totally isolate"
- In reply to: John Brock: "Re: 'my' doesn't totally isolate"
- Next in thread: John Brock: "Re: 'my' doesn't totally isolate"
- Reply: John Brock: "Re: 'my' doesn't totally isolate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 11 Jun 2004 02:38:07 GMT
>>>>> "JB" == John Brock <jbrock@panix.com> writes:
JB> In article <1730eb2493fa60400c1ab7af77117a22@news.teranews.com>,
JB> Randal L. Schwartz <merlyn@stonehenge.com> wrote:
>>>>>>> "John" == John Brock <jbrock@panix.com> writes:
John> Hmmm.... So how am I supposed to distinguish between an array
John> which has not been assigned to and one whose length just happens
John> to be zero?
>>
>> You don't. The difference between the two is (ahem) undefined. :)
>>
>> defined() on aggregates is deliberately undefined, because it depends
>> on allocation strategies. You want to slow down *all* of Perl just
>> to get something you should figure out from context instead?
JB> Well, I thought I *was* figuring it out from context. I thought
JB> Perl had a nice little feature where I could tuck some extra
JB> information into one variable rather than defining two. But if it
JB> doesn't work that way then it doesn't work that way.
JB> I guess that means I can't even trust that defined(@aaa) will always
JB> return FALSE if I call it after calling undef(@aaa) (even though
JB> that seems to work for me right now). Bummer!
you are not making much sense here. why should you care if an array was
allocated or not? it is not a useful boolean as you have little control
over it. what control you see is an undocumented side effect and may go
away.
now state your real problem and stop worrying about array storage
allocation and undef. it is a red herring and you should drop it now.
uri
-- Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com --Perl Consulting, Stem Development, Systems Architecture, Design and Coding- Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
- Next message: Purl Gurl: "Re: 'my' doesn't totally isolate"
- Previous message: Uri Guttman: "Re: 'my' doesn't totally isolate"
- In reply to: John Brock: "Re: 'my' doesn't totally isolate"
- Next in thread: John Brock: "Re: 'my' doesn't totally isolate"
- Reply: John Brock: "Re: 'my' doesn't totally isolate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|