Re: What programming languages are simply abstractions on top of another programming language?

Kaz Kylheku <>
Wed, 22 Jun 2022 01:31:41 -0000 (UTC)

          From comp.compilers

Related articles
| List of all articles for this month |

From: Kaz Kylheku <>
Newsgroups: comp.compilers
Date: Wed, 22 Jun 2022 01:31:41 -0000 (UTC)
Organization: A noiseless patient Spider
References: 22-06-047
Injection-Info:; posting-host=""; logging-data="24906"; mail-complaints-to=""
Keywords: macros
Posted-Date: 21 Jun 2022 21:48:57 EDT

On 2022-06-18, Roger L Costello <> wrote:
> Hi Folks,
> I am reading "Software Tools" by Kernighan and Plauger. One of the things that
> I've learned is that Ratfor is a simple abstraction on top of Fortran. For
> example, Ratfor provides a while loop. The while loop can be mechanically
> converted to Fortran if-then and goto statements. Really cool!
> That got me to wondering, "What other programming languages are simply
> abstractions on top of an existing programming language?"

In the Ratfor spirit, in April 2022, I introduced a new one: cppawk.

Using the GNU C preprocessor, with C99 semantics, I managed to build,
for instance, a loop macro that supports multiple clauses that
combine for parallel or nested (cross product) iteration.

Not only are there some userful predefined clauses, but they
are user-definable.

Even the Common Lisp LOOP macro deosn't have user-definable clauses.
I made it possible in five #define statements.



There is a "Mock Lisp" data abstraction layer as well: cons cells
are represented and such. Lists can be passed around and mapped
over (if you have GNU Awk, which has indirect functions).

cppawk provides a case statement which "compiles" either to
a GNU Awk switch (nonstandard extension) or else portable
constructs that work in other Awks.

> /Roger
> [The infamous m4 macrogenerator is used to build what are in effect new
> languages like the sendmail configuration and GNU Autoconf. -John]

GNU m4 underlies the Bison implementation: it's what glues together
the parser skeleton templates with the grammar tables and whatnot
to produce the output.

TXR Programming Language:
Cygnal: Cygwin Native Application Library:

Post a followup to this message

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