Article View: comp.lang.misc
Article #3839Re: languages which allow the introduction of new operators
From: Wayne Throop
Date: Sat, 14 Nov 1992 02:21
Date: Sat, 14 Nov 1992 02:21
35 lines
2257 bytes
2257 bytes
:: From: kers@hplb.hpl.hp.com (Chris Dollin) writes: :: Message-ID: <KERS.92Nov12085629@cdollin.hpl.hp.com> :: [...] define 5 ++( x, y ); lvars x, y; x + y + 1 enddefine; [...] : From: hrubin@pop.stat.purdue.edu (Herman Rubin) : Message-ID: <BxMCxA.3nM@mentor.cc.purdue.edu> : [...] I would accept that as the insertion of the ++ operator. :: (Pop is an open-stack language), ``x * y'' means ``push x, push y, :: call -'', and ``f(x)'' means ``push x, call f''. : But I would object to any language which insists that we use a : strictly stack machine. Pushing, popping, and calling are to be : avoided unless necessary. Otherwise things just run too slowly to be : of more than theoretical use. This is yet another case of confusing the abstract notation with a concrete implementation. Just because the abstract semantics has the model of a stack is NO reason to suppose that this forces one to implement the model using an explicit stack with explicit push and pop operations. (Not being intimately familiar with Pop, it may be that Pop *does* require an explicit stack in the implementation, but that can't be told just from what Chris said. Certainly he explicitly said that the "call" operation may be open-coded in such a way as to involve no actual call operation at runtime, as a property of the operation, thus:) :: *Some* procedure calls are coded in-line, but this is not a property of :: being (syntactically) operators; it is a property of being a particular :: procedure, such as fast_front, or fi_+. ( BTW, note the difference between a stack explicit in the notation, vs one explicit in the implementation. This is the opposite of the case of pointers vs references previously discussed. ) -- Wayne Throop ...!mcnc!dg-rtp!sheol!throopw
Technical Details
Message-ID:
<721718060@sheol.UUCP>Path:
arc1-ca.pugleaf.net!sparky!uunet!psinntp!dg-rtp!sheol!throopwReferences:
<721458276@sheol.UUCP> <veit.721491920@du9ds3> <KERS.92Nov12085629@cdollin.hpl.hp.com> <BxMCxA.3nM@mentor.cc.purdue.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!dg-rtp!sheol!throopw From: throopw@sheol.UUCP (Wayne Throop) Newsgroups: comp.lang.misc Subject: Re: languages which allow the introduction of new operators Summary: confusing the abstract with the concrete Message-ID: <721718060@sheol.UUCP> Date: 14 Nov 92 02:21:03 GMT References: <721458276@sheol.UUCP> <veit.721491920@du9ds3> <KERS.92Nov12085629@cdollin.hpl.hp.com> <BxMCxA.3nM@mentor.cc.purdue.edu> Lines: 35