Re: Looking for new language features

adrian@dcs.rhbnc.ac.uk (A Johnstone)
17 Sep 2000 22:59:39 -0400

          From comp.compilers

Related articles
[3 earlier articles]
Re: Looking for new language features rhyde@cs.ucr.edu (Randall Hyde) (2000-09-09)
Re: Looking for new language features guerby@acm.org (Laurent Guerby) (2000-09-09)
Re: Looking for new language features mq@maq.org (2000-09-11)
Re: Looking for new language features rosing@peakfive.com (Matt Rosing) (2000-09-11)
Re: Looking for new language features rhyde@cs.ucr.edu (Randall Hyde) (2000-09-13)
Re: Looking for new language features viczh@uic.edu (Victor Joukov) (2000-09-15)
Re: Looking for new language features adrian@dcs.rhbnc.ac.uk (2000-09-17)
Re: Looking for new language features mr@peakSPAMLESSfive.com (Matt) (2000-09-21)
Re: Looking for new language features georg.lokowandt@sap.com (Georg Lokowandt) (2000-09-23)
Re: Looking for new language features vbdis@aol.com (2000-09-28)
Re: Looking for new language features rhyde@cs.ucr.edu (Randall Hyde) (2000-10-01)
Re: Looking for new language features idbaxter@semdesigns.com (Ira D. Baxter) (2000-10-06)
Re: Looking for new language features mr@peakSPAMLESSfive.com (Matt) (2000-10-06)
[2 later articles]
| List of all articles for this month |

From: adrian@dcs.rhbnc.ac.uk (A Johnstone)
Newsgroups: comp.compilers
Date: 17 Sep 2000 22:59:39 -0400
Organization: Royal Holloway, University of London
References: 00-08-13000-09-048 00-09-07500-09-084 00-09-095
Keywords: design

I've got a lot of sympathy with Randy's philosophy, bit I think
extensible languages are too hard to use, although being able to
define new operators as in Algol-68 is great. 'Syntax du jour' is a
great line, but the real problem is that people who enjoy this sort of
thing end up producing write-only programs. A write-only language is
one in which programs are written, and then never comprehended by a
subsequent reader. I look at a lot of undergraduate programs, and the
difficulty of extracting semantics from them is amazing: I don't know
what I would do if I couldn't even recognise the keywords! Anybody who
has ever done large scale programming in Forth or TeX (which is a
macro expansion language) might recognise the write-only syndrome.


However, all of this is manageable. The real problem is the semantic
design of a language. Being able to define whacky syntax may sound
fun, but as anybody who has really designed a new language knows, the
interactions between semantic objects, especially the type system, the
operators and the control flow structures can throw up very
uncomfortable errors and what's worse, things that aren't errors but
have very unexpected effects. I would go as far as to say that the
syntax side of extensible languages is trivial. Languages that are
`powerful' in an application domain like SNOBOL for string processing
derive that power from the design of the basic `things' that can be
manipulated in that language. Allowing the user to define trick syntax
is irrelevant unless you can extend the underlying basic toolkit, and
you do that at your peril.


So, all this is to say that the design of a consistent and powerful
language design is very hard and has almost nothing to do with
syntax. Designing a meta-language with those characteristics, i.e. one
that allows the users to define their _own_ consistent and powerful
language is in my view too hard unless you don't mind your users being
suprised. (And that means I don't want to fly in anything programmed
in such a language.) However, providing a good type system and some
facilities for adding new operators so that I can, for instance write
my own vector library (I mean mathematical vectors) which supports +
. and x operators rather than requiring me to use obscure function
names is all very worthwhile.


                                                              Adrian


--
Dr Adrian Johnstone, Senior Lecturer in Computing, Computer Science Dep,
Royal Holloway, University of London, Egham, Surrey, TW20 0EX, England.
Email a.johnstone@rhbnc.ac.uk Tel:+44(0)1784 443425 Fax:+44(0)1784 439786


Post a followup to this message

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