Re: Pronouns in programming language?

neitzel@gaertner.de (Martin Neitzel)
6 Mar 2000 01:10:58 -0500

          From comp.compilers

Related articles
[12 earlier articles]
Re: Pronouns in programming language? cbrtjr@ix.netcom.com (Charles E. Bortle, Jr.) (2000-03-06)
Re: Pronouns in programming language? cbrtjr@ix.netcom.com (Charles E. Bortle, Jr.) (2000-03-06)
Re: Pronouns in programming language? mal@bewoner.dma.be (Lieven Marchand) (2000-03-06)
Re: Pronouns in programming language? carles.blas@uab.es (Carles Blas Anglada) (2000-03-06)
Re: Pronouns in programming language? zorn@microsoft.com (Ben Zorn) (2000-03-06)
Re: Pronouns in programming language? nr@labrador.eecs.harvard.edu (2000-03-06)
Re: Pronouns in programming language? neitzel@gaertner.de (2000-03-06)
Re: Pronouns in programming language? joachim.durchholz@halstenbach.com.or.de (Joachim Durchholz) (2000-03-06)
Re: Pronouns in programming language? ralph@inputplus.demon.co.uk (2000-03-11)
Re: Pronouns in programming language? genew@shuswap.net (2000-03-21)
| List of all articles for this month |

From: neitzel@gaertner.de (Martin Neitzel)
Newsgroups: comp.compilers
Date: 6 Mar 2000 01:10:58 -0500
Organization: Gaertner Datensysteme, Braunschweig, Germany
References: 00-02-149
Keywords: design

John Fremlin <vii@altern.org> writes:
JF>
JF> Has any programming language/compiler implemented pronoun like
JF> constructs? For example:


The "J" programming language has a grammar defined in terms of "nouns",
"verbs", "adverbs", "conjunctions", "gerunds", "sentences", and "phrasal
forms". Adverbs and conjunctions are higher-order functionals applying
to one or two verbs (i.e., functions), respectively. It's amazing how
flexible it is syntactly, and it is also amazing how satisfying it is
to escape from the old rigid subject-predicate-object straight-jacket
most other langages force upon us poor programmers.


More specific to the original question on pronouns:


J has various "phrasal forms" which are implicit combinators. The "Hook"
form provides essentially possessive pronouns:


      (+ %) 4 NB. input expression
4.25 NB. result: 4 plus *its* reciprocal


As you can see, an isolated function group forms not just a plain pipeline
function, but some more hideous data flow setup. The rules are simple,
though. Common experience of all J programmers is:


"First you wonder if you'd ever have use for these constructs --
but then you slowly but surely recognize that they are EVERYWHERE."


Academic plug: Kenneth E. Iverson et al.: "The Dictionary of J", 1990 1st
edition, has been roughly yearly revised, along with the implementation.
Yes, that's the APL Iverson, and yes, J sure groks arrays (but not greek
symbols, phew ;-) And no, there's no "ava" behind this J.


Commercial/informational/evaluational/in-depth plug: go to
http://www.jsoftware.com/ for more info. Supported platforms are MS
Windows, MacOS, various Unixens, and, of course: Your Mind.


Ob. comp.compilers: Sorry, J has the the evil eval primitive. Other than
that, compiling J is a great project for a compiler construction class.
Tokenization and parsing are very simple, and students can really get
to the business of good code generation with this language.


Martin Neitzel


Post a followup to this message

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