Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #3076 > unrolled thread
| Started by | Roger L Costello <costello@mitre.org> |
|---|---|
| First post | 2022-06-18 19:42 +0000 |
| Last post | 2022-06-22 01:31 +0000 |
| Articles | 5 — 5 participants |
Back to article view | Back to comp.compilers
What programming languages are simply abstractions on top of another programming language? Roger L Costello <costello@mitre.org> - 2022-06-18 19:42 +0000
Re: What programming languages are simply abstractions on top of another programming language? gah4 <gah4@u.washington.edu> - 2022-06-20 15:36 -0700
What programming languages are simply abstractions on top of another programming language? Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-06-21 23:34 +0300
Re: What programming languages are simply abstractions on top of another programming language? George Neuner <gneuner2@comcast.net> - 2022-06-21 15:10 -0400
Re: What programming languages are simply abstractions on top of another programming language? Kaz Kylheku <480-992-1380@kylheku.com> - 2022-06-22 01:31 +0000
| From | Roger L Costello <costello@mitre.org> |
|---|---|
| Date | 2022-06-18 19:42 +0000 |
| Subject | What programming languages are simply abstractions on top of another programming language? |
| Message-ID | <22-06-047@comp.compilers> |
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?" /Roger [The infamous m4 macrogenerator is used to build what are in effect new languages like the sendmail configuration and GNU Autoconf. -John]
[toc] | [next] | [standalone]
| From | gah4 <gah4@u.washington.edu> |
|---|---|
| Date | 2022-06-20 15:36 -0700 |
| Message-ID | <22-06-053@comp.compilers> |
| In reply to | #3076 |
On Monday, June 20, 2022 at 3:06:46 PM UTC-7, Roger L Costello wrote: (snip) > That got me to wondering, "What other programming languages are simply > abstractions on top of an existing programming language?" About the same time as Ratfor, there was MORTRAN, more specifically MORTRAN2. https://www.slac.stanford.edu/vault/collvault/greylit/cgtm/CGTM165.pdf The MORTRAN2 processor is written in ANSI standard Fortran 66, with the exception of the need to assign and compare character data. (Yes, Fortran 66 doesn't guarantee that ability.) The processor works along with a set of macros that implement structured programming similar to ratfor. Not so long after MORTRAN2, and from the same group, is STEP which I recently posted about. The STEP processor can fully parse its input, mostly so that error messages are generated correctly. http://www.bitsavers.org/pdf/stanford/slac/The_STEP_Processor.pdf As well as I know, STEP is also ANSI standard Fortran 66 with the same requirement. As more structured programming was added to Fortran, there was less need to try to improve it with such processors. The original C++ was a processor, cfront, that would generate C code, that was then compiled by a C compiler. I believe not so much later, though, an actual C++ compiler was available. I don't know if cfront is still around. The TeX text processor has many built-in operations, but much of plain TeX is implemented in a standard set of macros. Then LaTeX was implemented with a different, and larger, set of macros. I believe it satisfies you question. Then there is WEB, the literate programming system D. Knuth used to write TeX, which mixes the code (in Pascal) and documentation (in TeX) in one file. One then processes it with Tangle (to get the code), or Weave (to get documented and supposed to be more readable source code). I suspect that there were many programs written for a single use, and not generally released. And then there are parser generators, a favorite topic of this group, which read input that describes the grammar to parse, and generates C or Java, or some other language, code to actually do it. I will leave out assemblers, including macro assemblers, and programs to preprocess assembly code, though they might also satisfy the question.
[toc] | [prev] | [next] | [standalone]
| From | Christopher F Clark <christopher.f.clark@compiler-resources.com> |
|---|---|
| Date | 2022-06-21 23:34 +0300 |
| Message-ID | <22-06-061@comp.compilers> |
| In reply to | #3079 |
There are more than a few languages which compile to the JVM (Java Virtual Machine). Lombok for Java, presuming you consider it a language fits that example. My impression is that Kotlin is an evolution of that. Scala is another possible example. I'm sure there are more. The lisp/scheme people do that quite often with "hygenic macros" and the "Racket" (or "Dr Racket") parser generator is built using that idea. -- ****************************************************************************** Chris Clark email: christopher.f.clark@compiler-resources.com Compiler Resources, Inc. Web Site: http://world.std.com/~compres 23 Bailey Rd voice: (508) 435-5016 Berlin, MA 01503 USA twitter: @intel_chris ------------------------------------------------------------------------------
[toc] | [prev] | [next] | [standalone]
| From | George Neuner <gneuner2@comcast.net> |
|---|---|
| Date | 2022-06-21 15:10 -0400 |
| Message-ID | <22-06-059@comp.compilers> |
| In reply to | #3076 |
On Sat, 18 Jun 2022 19:42:55 +0000, Roger L Costello <costello@mitre.org> wrote: >... "What other programming languages are simply >abstractions on top of an existing programming language?" In addition to gah4's excellent list, I would include Lisp in which a significant fraction is implemented as macros which build on a simpler version of Lisp. And of course, Lisp's metalanguage is Lisp. Some amount of Scheme also is macros building on simpler Scheme, however Scheme's metalanguage is not Scheme but a hybrid that includes Scheme. How much is implemented using macros depends on the particular implementation. YMMV, George
[toc] | [prev] | [next] | [standalone]
| From | Kaz Kylheku <480-992-1380@kylheku.com> |
|---|---|
| Date | 2022-06-22 01:31 +0000 |
| Message-ID | <22-06-067@comp.compilers> |
| In reply to | #3076 |
On 2022-06-18, Roger L Costello <costello@mitre.org> 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. https://www.kylheku.com/cgit/cppawk/about/ 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. "LOL" :) 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: http://nongnu.org/txr Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
[toc] | [prev] | [standalone]
Back to top | Article view | comp.compilers
csiph-web