Related articles |
---|
[2 earlier articles] |
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 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) |
[3 later articles] |
From: | "Victor Joukov" <viczh@uic.edu> |
Newsgroups: | comp.compilers |
Date: | 15 Sep 2000 01:32:03 -0400 |
Organization: | Compilers Central |
Keywords: | design |
etoffi@bigfoot.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
and wrote:
> 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
Proposed extensions syntax stems from Python's. Coincidentally I
implemented some mechanism (rather ugly) in Python which effectively
allows using very powerful macros (limited by Python's expression
power only). The overall effect is not ability to create new
syntactic extensions to the host language (this is undoubtedly makes
language a mess), but allowing to introduce higher level constructs by
translation into host language.
This is also relevant for another discussion in this list on
"separation of algorithms from implementations". Introduced idioms,
which are translated during compile time into host language
implementations can be coded diffently, in the spirit of Charles'
Simonyi Intentional Programming -
http://www.research.microsoft.com/ip/
That is these macros, though type-unsafe (they are almost not
integrated into the host language, allowing extending many languages,
not only C/C++), support declarative-imperative programming style, in
which each high-level construct to be compiled need to be supported by
interchangeable implementation.
I used this approach to generate CORBA IDL file, C++ headers and
implementation for CORBA classes, reflection information, XML
description and database creation script from single data structure
describing data scheme.
Victor Joukov.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.