[comp.lang.forth] C and Forth error handling

wmb@MITCH.ENG.SUN.COM (10/31/90)

>> ...and why C and Pascal were never objects of their ridicule?
>> C has error recovery (setjmp()/longjmp()), and a great many
>> significant C programs use it.

> The operative word was "never".  My original K&R "The C Programming Language"
> makes no mention of error recovery; yet somehow C survived its early years and
> now prospers.

In the early years, C largely existed in a single environment (Unix).
By the time that C became popular in other environments, there was
a "de facto" set of library routines that all successful C implementations
have mimiced.  setjmp()/longjmp() is included in this category. C was
mostly complete by the time it "broke loose from the Unix environment".

There are a lot of "de facto standard" C library subroutines that every
decent C implementation is expected to include, but which are not mentioned
in the original K&R.

Every C implementation that I have used in the last 10 years has had
setjmp()/longjmp(), and C didn't become really popular until about
5 years ago.

In contrast, many early Forth implementations were "stripped-down" systems
without a lot of extensions or tools.  When extended Forth systems did
begin to appear, the extensions were largely incompatible.

(Note that Forth and C were invented at about the same time; around 1970).

Forth has no "de facto" standard.  It has a couple of incompatible and
woefully-incomplete published standards, and most of the important commercial
Forth systems do not strictly adhere to either standard, nor are they
compatible with one another.

It is my personal belief (although I am by no means alone in this belief)
that Forth better grow up in a hurry, or die.  We are arguing about stuff
that the rest of the computing world has "taken for granted" for a decade.
By "taken for granted", I mean you "pull the subroutine out of the box, use
it, and forget about it (because it just works)".

Mitch