Pascaline: A demonstrative standard #263
samiam95124
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Pascaline: A demonstrative standard
There is an old saw in standards groups for languages that, in an ideal standard, nothing should be standardized unless someone shows up with a working implementation. This, of course, implies that the standard is a cobbled together bag of features, but that is another story.
So the question exists: is Pascaline a demonstrative standard? Well, it actually is, but that is not necessarily a good thing. Its more of the way the standard evolved. In the 1993 to 1995 years, I wanted to replace the first version of my Pascal compiler with a follow on compiler incorporating what I learned with the first compiler.
The first compiler was almost completely strict ISO 7185 Level 1 Pascal. It had added system functions and procedures, but that was about it. And those were minimal. It had modularity, but that was copied directly from C, with an "include" line:
#include file
And it worked just like C does, which was to include the entire file on the next line, then resume the existing source.
Source files could be compiled separately, and linked together. External procedures and functions could be indicated by the "external" keyword, again, just like in C. In fact, in those days, around 1983 when the compiler was designed, my goal was to make Pascal look like C. This ended when I went to work on a Unix implementation writing C drivers for it, and I saw that, as an early C programmer, most of the time was spent debugging bad pointer references.
The compiler also had the ability to create arbitrary length arrays, and that was done by:
new(p, len);
That is, you could specify the exact length of an array to be allocated, regardless of the typed length of the array in its type. You kept track of that length yourself. If you indexed beyond the end of the array, too sad too bad. The result was a crash. The system was entirely oriented around being able to store strings in dynamic storage without wasting bytes.
Enter Pascaline
The 1993 to 1995 design additions to Pascal were oriented around three subjects:
[1]
In fact, all of these became fairly involved. Modules started with the "module" or plain module, then later went to monitor, process and share modules for parallel tasking. Arrays were single index (vectors) without index specifications, like:
array of integer;
The point of this is that these early Pascaline features were planned individually by design papers, implemented and checked before being accepted as part of the language.
Going forward
In about 2010 I decided that cobbling together features was not the way to go for a language, and so I took about a year to create the complete Pascaline specification. A lot of it was codification of existing features in IP Pascal. But a lot was not, for example N-length arrays with more than one index, properties, matrix operations, classes, etc.
Pascaline is not completely implemented in Pascal-P6. But I decided that all of it going forward would be demonstrative. That is, things in the standard would not be accepted unless there is already a working implementation of them.
[1] All three of which can be seen in the strings library, which was written about that time.
Beta Was this translation helpful? Give feedback.
All reactions