I've been following the trend of languages beginning to compile down to Java bytecode. Java was the original language to do so, and now Visual Basic, future portions of COM+, and even Perl are in the works on such a strategy.
In my mind, Pascal is the *perfect* language to see a Java bytecode implementation. I've used Borland Delphi over the years, and I regret that the native ties to the O/S (Win32 messaging calls, and assembly-language RTL pieces) which made it successful and a fast performer in the short term, are the very thing that keep it from realizing its potential as a totally outstanding cross-platform tool.
That possibility is still open for GNU Pascal. Just a thought, in case there are any college professors on this list who might see this as both a fresh and relevant spin on a traditional compiler course, and a worthy contribution to GNU.
We all want to write our Pascal, and not see it stop running 10 years from now just because we've changed our operating environments.
David
Hello!
According to David Rauschenbach:
[...] In my mind, Pascal is the *perfect* language to see a Java bytecode implementation.
Something *very* similar to this already existed many years ago: UCSD Pascal. I consider this the direct ancestor of Borland Pascal. (Somebody knows some details?)
I've used Borland Delphi over the years, and I regret that the native ties to the O/S (Win32 messaging calls, and assembly-language RTL pieces) which made it successful and a fast performer in the short term, are the very thing that keep it from realizing its potential as a totally outstanding cross-platform tool.
GNU compilers are already highly portable without any bytecode. You can compile the same GNU Pascal source on DOS as well as on AIX, Solaris, Irix, or Linux.
That possibility is still open for GNU Pascal. Just a thought, in case there are any college professors on this list who might see this as both a fresh and relevant spin on a traditional compiler course, and a worthy contribution to GNU.
Something close to this is already being worked on: Scan the source of gcc-2.7.2.x or gcc-2.8.0 for "bytecode".
I don't know if that's the same bytecode Java produces. Somebody knows?
We all want to write our Pascal, and not see it stop running 10 years from now just because we've changed our operating environments.
This cannot happen with GNU compilers unless somebody imposes things like undocumentated API calls etc. intentionally to prevent the world from porting GNU to that system.
Greetings,
Peter
Something close to this is already being worked on: Scan the source of gcc-2.7.2.x or gcc-2.8.0 for "bytecode".
I don't know if that's the same bytecode Java produces. Somebody knows?
No, this is not Java bytecode. It is a gcc bytecode that never made it to prime time.
Actually, it would be nice if a new target (backend) to Java bytecode was done, then all front ends would be able to compile to Java bytecode. Then, any lanugage front end could be used for making applets or other such stuff.
Peter Gerwinski wrote:
Hello!
According to David Rauschenbach:
[...] In my mind, Pascal is the *perfect* language to see a Java bytecode implementation.
Something *very* similar to this already existed many years ago: UCSD Pascal. I consider this the direct ancestor of Borland Pascal. (Somebody knows some details?)
Indeed, UCSD seems to be the ancestor of Turbo Pascal (a lot of similarities). AFAIK, UCSD Pascal produced portable p-code. Certainly, the Cabot implementation of it does. The p-code can be run on any operating system (that is supported by Cabot environment?). The Cabot UCSD system has its own file system, etc., and the compiled programs run in a virtual environment which is complete with its own file system (with long filenames, etc.). The environment itself is enclosed in a file which appears to the host operating system as just a single large file. The p-code binary is very small, because all the facilities that it needs are inside the environment. The idea is that, if a port of the environment exists for your operating system, then any p-code program written for any platform will run on your operating system as well.
Now, I am writing all this from (long term) memory. I reviewed the Cabot UCSD Pascal compiler for the Pascal Magazine (ancestor of the Delphi Magazine) a few years ago, and I am writing from what I remember. I might have got some facts mixed up, but I think I remember the general idea.
Best regards, The Chief -------- Dr. Abimbola A. Olowofoyeku (The African Chief) Email: laa12@keele.ac.uk Homepage: http://ourworld.compuserve.com/homepages/African_Chief/ Author of: Chief's Installer Pro 4.20 for Win16 and Win32: ftp://ftp.simtel.net/pub/simtelnet/win3/install/chief420.zip