These are all very good and valid points, thanks ...
I only would like to comment on the first topic (execution model),
because I am working on a Pascal compiler (since 2011)
which has an execution model which might be interesting in this context.
On the mainframe:
- Pascal source code translated to P-Code in phase 1 (P-Code is a
readable "Assembly" code for a hypothetical "stack machine";
it looks a bit like Java byte code, but the idea is some 20 years older)
- P-Code translated to 370 machine code in phase 2 (no 370 "Assembler
code"; direct machine instructions)
On other platforms (Unix, Linux, Windows, OS/2):
- Pascal source code translated to P-Code in phase 1 (the P-Code looks
the same as in the mainframe variant and can be
transferred across platforms; the compiler is the same .. written in
Pascal) ... BUT:
- the P-Code is interpreted by a C-programm (no native code generated)
Because the "Interpreter" in the non-mainframe case does a (sort of)
compilation (from P-Code to an internal representation,
designed for fast execution), the programs run surprisingly fast ..
especially if they are I/O bound and not so much CPU bound.
The reason for this difference is mainly: because I had not enough time
until now to build a P-Code to binary translator
for the non-mainframe case :-(
If you are interested, look here: http://bernd-oppolzer.de/job9.htm
Kind regards
Bernd
Am 11.11.2024 um 22:43 schrieb Matt Hogstrom:
Seems like an academic exercise. The line was blurred years ago. For
instance, Python would be considered a “scripting language” but it can also be
compiled into pac for faster execution
There are different dimensions to consider like below. In the end I think
today its tomato versus tomato
But, you’ll likely never write an OS in COBOL even though you have to compile
it.
1. Execution Model
Programming Languages:
• Generally compiled into machine code before execution. • Examples: C,
C++, Rust.
• Compilation produces an executable binary that can run independently
of the source code.
• Scripting Languages: • Typically interpreted at runtime by an
interpreter.
• Examples: Python, JavaScript, Ruby. • Source code is read and
executed line by line or via a virtual machine.
Scripting Languages:
• Typically interpreted at runtime by an interpreter.
• Examples: Python, JavaScript, Ruby.
• Source code is read and executed line by line or via a virtual
machine.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN