Re: Pronouns in programming language?

Carles Blas Anglada <carles.blas@uab.es>
6 Mar 2000 00:27:19 -0500

          From comp.compilers

Related articles
[9 earlier articles]
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)
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: Carles Blas Anglada <carles.blas@uab.es>
Newsgroups: comp.compilers
Date: 6 Mar 2000 00:27:19 -0500
Organization: Universitat Autonoma de Barcelona
References: 00-02-149
Keywords: design

John Fremlin wrote:


> Has any programming language/compiler implemented pronoun like
> constructs? For example:
>
> if variable_with_long_name == '2 ,
> { do this; }
> if it == '3 , # equivalent to: variable_with_long_name == '3
> { do that }
>


Apart from a nice theoretical discussion. Why does anybody need it? (Or why
does anybody need pronouns?). In your example there is an elegant
construction that answers that question: switch.


switch (variable_with_long_name)
      case 2: do_this; break;
      case 3: do_that;


Post a followup to this message

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