On 2026-06-19 5:56 p.m., Graham Toal via cctalk wrote:
On Thu, Jun 18, 2026 at 9:19 PM Van Snyder via cctalk
<cctalk(a)classiccmp.org>
wrote:
True, but
that approach has significant drawbacks and from where I
sit it appears more like a technique that was used for a while as a
shortcut to implementing a language. All the examples you gave are
now obsolete, at least in the GCC system, replaced by full front ends
that tie into the code generation machinery. A reason why this
matters is debug info; having C debug info for your Fortran program,
let alone COBOL or Pascal, is painful. Another reason is semantic
mismatches. C doesn't like nested function definitions (though GCC
sort of allows them as an extension) while other languages (Algol for
sure, and Pascal also I think) consider them perfectly good things to
do.
I'm currently working, off and on, on exactly this. I'm translating the
Imp language (which is a very Algol60-like derivative of Atlas Autocode,
which itself was a rival response to the '58 proposal that became Algol 60)
to C. Yes, I am limited to gcc due to the nested procedures, but I'm doing
it because I think gcc has a better chance of some longevity than a native
bootstrapped Imp port. (which we currently have to x86 architecture as well
as this translation project.) Imp had extensive runtime diagnostics and
post mortem facilities as well as symbolic debugging on some platforms, and
the linux/gcc environment has allowed me to reproduce many of them.
Extensive use of #line allows most of the diagnostics to appear to be in
the source language and the mapping to C is close enough that debugging
with gdb is not an issue.
Is the problem here, that there is no standard module interface between
languages at the library level? Operating systems seem to just have one
programming language defined. FORTRAN - IBM, UNIX C,PL/M CP/M.
PL/1 and C are the only two high level languages a operating system is
written in, that I can think of that are well documented, and easily
found on the WEB.
Ben.
PS. As side note, Compiling into C, kills the concept of self hosting
unless you have 32 bit addressing.
PPS: Is there any good Documentation on IMP?