Message from discussion
Determining PMC memory addresses
Newsgroups: perl.perl6.internals
Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.stanford.edu!nntp.perl.org
Return-Path: <j...@osp.nl>
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: jadzia.josvisser.nl: josv set sender to j...@osp.nl using -f
Date: Fri, 28 Nov 2003 18:41:29 +0100
To: perl6-intern...@perl.org
Subject: Re: Determining PMC memory addresses
Message-ID: <20031128174129.GD10329@jadzia.josvisser.nl>
Mail-Followup-To: perl6-intern...@perl.org
References: <Pine.LNX.4.44.0311281211580.3139-100000@nevis.internal.amnh.org> <Pine.LNX.4.58.0311281018050.25627@okcomputer.antiflux.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <Pine.LNX.4.58.0311281018050.25627@okcomputer.antiflux.org>
User-Agent: Mutt/1.3.27i
X-Last-Book-Read: "Artemis Fowl -- The eternity code", by Eoin Colfer
X-Mini-Review: Such a nice book to read...
X-Full-Review: See http://josvisser.nl/bookcorner.html
X-Now-Reading: "The Narnia Chronicles", by C.S. Lewis
X-URL: http://josvisser.nl
X-Sentinel: fairy magic Foaly time-stop LEP Haven gnome troll
X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/)
X-Spam-Check-By: la.mx.develooper.com
X-Spam-Status: No, hits=-0.6 required=7.0 tests=CARRIAGE_RETURNS,IN_REP_TO,QUOTED_EMAIL_TEXT,RCVD_IN_RFCI,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_MUTT,X_AUTH_WARNING version=2.44
X-SMTPD: qpsmtpd/0.26, http://develooper.com/code/qpsmtpd/
Approved: n...@nntp.perl.org
From: j...@osp.nl (Jos Visser)
Lines: 60
On Fri, Nov 28, 2003 at 10:27:45AM -0700 it came to pass that Cory Spencer wrote:
>
> > > On Fri, 28 Nov 2003, Leopold Toetsch wrote:
> > >
> > > > Op vtable Meaning
> > > > - is_same PMCs are ident
> > > > - is_equal PMCs are equivalent, holding the same value
> > > > Y cmp cmp PMCs
> > > > - cmp_num cmp PMCs numerically
> > > > - cmp_string cmp PMCs as strings
> > > >
> > > > Proposals for opcode names welcome.
> > >
> > > [snip]
>
> Well, a page could be stolen from the Lisp book by defining eq/eql/equal
> opcodes (though in ths case, differing from the Lisp counterparts in the
> meaning of the tests) where
>
> - eq is true if both arguments have the same value (that is, both are
> numerically equal or both are equivalent strings)
> - eql is true if both arguments are the same, identical object
> - equal does a comparison to test if the two objects are structurally
> similar (ie. in the case of a PerlArray, an element-by-element
> comparrison would be performed to determine the similarity of the
> structure.)
>
> Cory
I think this is definitely something we should do if we want to confuse
people as much as possible :-)
Much can be said about this topic, but let's keep in mind that:
- The length of the opcode name is not important for execution speed or
memory space used (this contrary to the early LISP
machines/interpreters).
- English is only a small language (with respect to the amount of native
speakers, which are mainly restricted to a number of large islands
and some of the residents of a large and mostly uninhabited landmass
somewhere on the western hemisphere) :-)
Non-native speakers can not be trusted to immediately grasp the
semantic differences between things as:
- equal/identical/same
- compare/test
I would therefore vote that we keep these opcodes as verbose as
possible. So no eq/eql/equal, but rather
same_address/same_content/compare/compare_as_num/compare_as_string.
And remember, I am nobody... :-)
++Jos.es
--
Viel mehr als gestern liebe ich dich heute.
Doch weniger noch als ich dich morgen lieben wird.
"Wie vor Jahr und Tag", Reinhard Mey