Re: Looking for new language features

Randall Hyde <rhyde@cs.ucr.edu>
9 Sep 2000 13:20:42 -0400

          From comp.compilers

Related articles
Looking for new language features lingolanguage@hotmail.com (William Rayer) (2000-08-27)
Re: Looking for new language features etoffi@bigfoot.com (2000-09-08)
Re: Looking for new language features joachim_d@gmx.de (Joachim Durchholz) (2000-09-08)
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 (re-elaboration) lingolanguage@hotmail.com (William Rayer) (2000-09-13)
Re: Looking for new language features viczh@uic.edu (Victor Joukov) (2000-09-15)
[14 later articles]
| List of all articles for this month |

From: Randall Hyde <rhyde@cs.ucr.edu>
Newsgroups: comp.compilers
Date: 9 Sep 2000 13:20:42 -0400
Organization: Posted via Supernews, http://www.supernews.com
References: 00-08-13000-09-048
Keywords: design, macros

etoffi@bigfoot.com wrote on 9/8/00 2:15 PM:


  "William Rayer" <lingolanguage@hotmail.com> wrote:
> Uh, look at c3 on my site (email with any questions, as webpage
> updates are rather scarce in the wrld of etoffi).
>
> http://oluworld.sourceforge.net/c-compiler.html
>> [ PL/I
>> tried to incorporate every known language feature in the 1960s, and
>> ended up so ugly that in reaction people designed deliberately small
>> languages like Pascal. ]


Let me offer the following suggestion (which, undoubtedly, will raise
some red-flags with the anti-macro crowd): write a decent preprocessor
for C/C++ that gives you a compile-time language that lets people
create their own extensions to the language. PL/I has been abused a
bit in this thread, but one nifty feature it had was a very impressive
compile-time language/macro processor. I added something similar to
the HLA (High Level Assembly) language. With appropriate string and
pattern matching functions in the compile time language, the language
user can write little mini-parsers (i.e., DSELs) to incorporate any
language feature they desire. I've added lots of high level and very
high level language features to my assembly language programs using
exactly this technique, so I'm confident it would work well for you.


Of course, convincing C (and especially C++) programmers that using
macros is a good thing is another problem altogether :-)


Randy Hyde


Post a followup to this message

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