Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!ee.udel.edu From: new@ee.udel.edu (Darren New) Newsgroups: comp.lang.misc Subject: Re: Re^2: Closures (was Re: class-sic.) Message-ID: <42479@nigel.ee.udel.edu> Date: 22 Jan 91 20:14:08 GMT References: <27770.278aef90@kuhub.cc.ukans.edu> <22345:Jan1021:30:4591@ Sender: usenet@ee.udel.edu Organization: University of Delaware Lines: 29 Nntp-Posting-Host: estelle.ee.udel.edu In article kers@hplb.hpl.hp.com (Chris Dollin) writes: >They [POP-11 closures] do induce a tendency to organise argument lists in a >particular way - with the most "freezable" arguments at the right - which may >or may not be a good thing. Actually, I don't know that it is the closures doing this. FORTH has an "open stack" as I understand you to use the term, and "more freezable" arguments are also at the right. For example, x y ! (! is the assignment operator) will assign the value x to the variable y. I.e., a:=5 --> 5 a ! Here, the "a" comes second because you more often know statically what variable you want to store into than you know what value you want stored. That is, you more often have a procedure called "store into a" than you do one called "store a 5". Contrast this with PostScript code, where the storage operator (def) is often preceded by an exch (exchange) because the name of the value to be stored is coded into the procedure but the value is passed in. (I think this was done in order that procedure definitions had the name preceding the block of code.) Anyway, I think it is more the LIFO nature of the stack than the closure mechanism that makes "freezable" arguments on the right, unless you are implying that : storexyz xyz ! ; is a partial application of the ! function. -- Darren -- --- Darren New --- Grad Student --- CIS --- Univ. of Delaware --- ----- Network Protocols, Graphics, Programming Languages, Formal Description Techniques (esp. Estelle), Coffee, Amigas ----- =+=+=+ Let GROPE be an N-tuple where ... +=+=+=