Re: Pronouns in programming language?

Lieven Marchand <mal@bewoner.dma.be>
28 Feb 2000 03:00:23 -0500

          From comp.compilers

Related articles
Pronouns in programming language? vii@altern.org (John Fremlin) (2000-02-27)
Re: Pronouns in programming language? schairer@dai.ed.ac.uk (Axel Schairer) (2000-02-28)
Re: Pronouns in programming language? rweaver@ix.netcom.com (2000-02-28)
Re: Pronouns in programming language? pwagle@my-deja.com (2000-02-28)
Re: Pronouns in programming language? jjones@cs.uiuc.edu (2000-02-28)
Re: Pronouns in programming language? mal@bewoner.dma.be (Lieven Marchand) (2000-02-28)
Re: Pronouns in programming language? hamish.a@virgin.net (Hamish Atkinson) (2000-02-28)
Re: Pronouns in programming language? rkrayhawk@aol.com (2000-02-28)
Re: Pronouns in programming language? ele@freesurf.ch (H. Ellenberger) (2000-02-28)
Re: Pronouns in programming language? torbenm@diku.dk (2000-03-03)
Re: Pronouns in programming language? schairer@dai.ed.ac.uk (Axel Schairer) (2000-03-03)
Re: Pronouns in programming language? jejones@microware.com (James Jones) (2000-03-03)
[10 later articles]
| List of all articles for this month |
From: Lieven Marchand <mal@bewoner.dma.be>
Newsgroups: comp.compilers
Date: 28 Feb 2000 03:00:23 -0500
Organization: UUNET-NL (http://www.nl.uu.net)
References: 00-02-149
Keywords: design, syntax

John Fremlin <vii@altern.org> writes:


> Has any programming language/compiler implemented pronoun like
> constructs?


It has been done in Common Lisp. Paul Graham in his book "On Lisp"
calls these things anaphoric macros and devotes chapter 14 to them.


A nice example is his anaphoric AND:


(aand (owner x) (address it) (town it))


which returns the town (if there is one) of the address (if there is
one) of the owner (if there is one) of x.


An even more mindbending example is alambda


(alambda (x) (if (= x 0) 1 (* x self (1- x)))).





Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.