Re: Implementation Language Choice

Lex Spoon <lex@cc.gatech.edu>
2 Mar 2004 11:09:18 -0500

          From comp.compilers

Related articles
[5 earlier articles]
Re: Implementation Language Choice kevin@albrecht.net (Kevin Albrecht) (2004-02-13)
Re: Implementation Language Choice lex@cc.gatech.edu (Lex Spoon) (2004-02-26)
Re: Implementation Language Choice joachim.durchholz@web.de (Joachim Durchholz) (2004-02-26)
Re: Implementation Language Choice gdr@integrable-solutions.net (Gabriel Dos Reis) (2004-02-27)
Re: Implementation Language Choice joachim.durchholz@web.de (Joachim Durchholz) (2004-03-02)
Re: Implementation Language Choice la@iki.fi (Lauri Alanko) (2004-03-02)
Re: Implementation Language Choice lex@cc.gatech.edu (Lex Spoon) (2004-03-02)
Re: Implementation Language Choice torbenm@diku.dk (2004-03-06)
Re: Implementation Language Choice bettini@dsi.unifi.it (Lorenzo Bettini) (2004-03-06)
Re: Implementation Language Choice joachim.durchholz@web.de (Joachim Durchholz) (2004-03-11)
Re: Implementation Language Choice mayan@sandbridgetech.com (Mayan) (2004-03-19)
Re: Implementation Language Choice Barak.Zalstein@ceva-dsp.com (Barak Zalstein) (2004-03-26)
| List of all articles for this month |
From: Lex Spoon <lex@cc.gatech.edu>
Newsgroups: comp.compilers
Date: 2 Mar 2004 11:09:18 -0500
Organization: Georgia Institute of Technology
References: 04-02-109 04-02-131 04-02-149 04-02-164
Keywords: design
Posted-Date: 02 Mar 2004 11:09:18 EST

Joachim Durchholz <joachim.durchholz@web.de> writes:


> Lex Spoon wrote:
>> The feature that is especially nice is the pattern-matching switch
>> statement that most functional languages include.
>
> Agreed, pattern matching is nice. ("Pattern matching" as in "use a
> typesafe union type, and recognize the variant at hand and disassemble
> the record elements, all in a single construct"; the pattern matching
> we're talking about here is unrelated to regular expressions or image
> processing.)
>
> Though it's beyond me why this never made it into mainstream imperative
> languages; it's exceedingly useful.


Most languages seem to allow defining new variants in different parts
of the code. For example, an OO language will let you make new
subclasses at other parts of the code. This makes it harder to define
and to compile (see, on topic!) the case construct.


Also, there is a downside in that you are decomposing the *concrete
represenation*. Many languages -- and especially OO languages --
treat this as a breach of encapsulation and try to prevent it.


-Lex


Post a followup to this message

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