> On May 9, 2024, at 7:55 PM, Fred Cisin via cctalk <cctalk@classiccmp.org>
> wrote:
>
>>> ...
>>> I've written code in Pascal, as well as Modula-2. Never liked
>>> it--seemed to be a bit awkward for the low-level stuff that I was doing.
>
> On Thu, 9 May 2024, Paul Koning via cctalk wrote:
>> Not surprising, since that's not what it is all about. Both, like their
>> predecessor ALGOL-60 as well as successors like Ada, are strongly typed
>> languages where doing unsafe stuff is made very hard. Contrast that with C,
>> which sets out to make it easy to do unsafe things and partly for that
>> reason has a feeble type system. So doing low level stuff like device
>> drivers is difficult, unless you create extensions to break out of the type
>> system. An example of how to do that is the Burroughs extension of ALGOL
>> called ESPOL, which is what they used to write the OS. Actually, Burroughs
>> did a number of extended versions for different purposes; there's also
>> DCALGOL (Data comm ALGOL) intended for writing communications software. Why
>> that's separate from ESPOL I don't really know; I only ever got to do
>> regular ALGOL programming on Burroughs mainframes. One reason for that:
>> those systems depend on the compilers for their security; if ordinary users
>> got access to ESPOL they could write dangerous code, but in ALGOL they
>> cannot.
>
> One of the things that _I_ love about C is that it is easy to get it out of
> the way when you want to do something lower level.
>
> Rather than feeble type system, it could have had a requirement to explicitly
> "cast" anything being used as a "wrong" type.
>
> One of Alan Holub's books about C is titled
> "Enough rope to shoot yourself in the foot"
True, and Stroustrup added that "and C++ is a cannon that blows off your entire
leg".
> Each language has its own specialty. And you need to find the one that fits
> you best.
>
> It used to be (and likely still is), that every computer science grad student
> created a new language. A requirement (usually UNSPOKEN) was that the
> compiler be able to compile itself. That the language compiler is written
> (actually normally RE-written) in that language and compiled by that
> compiler. That certainly seems to bias things towards languages that are
> well suited for writing compilers! If you were to create a language that was
> specializzed for something completely different, and poorly suited for
> writing compilers, then it would not be respected.
If you don't mind the total lack of protection, FORTH is very nice: it even
more easily than C lets you do low level things, and it is also very small.
And the implementation is by definition entirely extensible. A large FORTH
program I wrote in the 1980s, on PDP-11 FORTH, starts out by redefining the
language as a 32-bit version.
I still remember a classmate of mine, who told me when we were both at DEC that
he had written an expression parser in COBOL. I think he also tried to do one
in RPG but found it was too hard.
paul