Message from discussion
Testing for null
Newsgroups: perl.perl6.internals
Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.stanford.edu!nntp.perl.org
Return-Path: <boemm...@physik.uni-kl.de>
Mailing-List: contact perl6-internals-h...@perl.org; run by ezmlm
Delivered-To: mailing list perl6-intern...@perl.org
Delivered-To: perl6-intern...@perl.org
X-Authentication-Warning: helium.physik.uni-kl.de: boemmels set sender to boemm...@physik.uni-kl.de using -f
Sender: boemm...@physik.uni-kl.de
To: Melvin Smith <mrjoltc...@mindspring.com>
Cc: Perl6 Internals <perl6-intern...@perl.org>
Subject: Re: [RfC] Testing for null
References: <5.1.1.6.2.20031203095021.06224eb0@pop.mindspring.com>
Date: 03 Dec 2003 16:41:32 +0100
In-Reply-To: <5.1.1.6.2.20031203095021.06224eb0@pop.mindspring.com>
Message-ID: <m2u14h29jn.fsf@helium.physik.uni-kl.de>
Lines: 33
User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Portable Code)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Check-By: one.develooper.com
X-Spam-Status: No, hits=-2.7 required=7.0 tests=CARRIAGE_RETURNS,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_GNUS_UA,X_AUTH_WARNING version=2.44
X-SMTPD: qpsmtpd/0.26, http://develooper.com/code/qpsmtpd/
Approved: n...@nntp.perl.org
From: boemm...@physik.uni-kl.de (Juergen Boemmels)
Melvin Smith <mrjoltc...@mindspring.com> writes:
[...]
> My intention for PMCNULL was to catch invalid interpreter state, or
> invalid bytecode; cases which used to give us core dumps.
>
> Explicitly returning PMCNULL and allowing tests on PMCNULL may
> or may not fit into this, depending on your point of view. I'm not even
> certain what my view of it is. Allowing ANY valid test on PMCNULL
> seems to muddy the water by allowing it to actually be used.
There is currently a way of creating such an object:
null P0
But you can't do anything with this object. If there are valid reasons
to create such an object, there should be a way to test for it.
> The question is: should we allow a NULL register test
> and would this replace Undef as the de facto way to return
> "nothing". Probably the answer is "yes" but I'd like to hear Dan's
> take on it.
There is currently no general Undef, only a PerlUndef, which warns if
used and morphs to a PerlInt when incremented. It might be best to
create a undef.pmc.
bye
boe
--
Juergen Boemmels boemm...@physik.uni-kl.de
Fachbereich Physik Tel: ++49-(0)631-205-2817
Universitaet Kaiserslautern Fax: ++49-(0)631-205-3906
PGP Key fingerprint = 9F 56 54 3D 45 C1 32 6F 23 F6 C7 2F 85 93 DD 47