[M3devel] SEGV mapping to RuntimeError

Mika Nystrom mika at async.caltech.edu
Sun Feb 20 01:59:04 CET 2011


Jay K writes:
>--_e4a53a7c-4058-44e7-bcce-18b6ae35efbe_
>Content-Type: text/plain; charset="iso-8859-1"
>Content-Transfer-Encoding: quoted-printable
>
>
>NIL might be a special case.
>But by and large=2C continuing to do anything after a SIGSEGV is a bad idea=
>.
>You think (you say) you are continuing on and preserving state=2C but the s=
>tate
>of the world is now arbitrarily altered and unknown and all future computat=
>ion
>based on it is suspect. Best to throw it away. And avoid incorrect results
>when there is a such a strong hint that things have gone awry.

Let's try this again.

The Green Book unequivocally says that non-UNSAFE code can't get the
world into a "state arbitrarily altered and unknown."  That doesn't
depend on the special case NIL, that's inherent in the design of the
language and runtime.

Yet non-UNSAFE code can (for efficiency reasons of the implementation)
cause a SIGSEGV.  

If the state of the world is somehow arbitrarily altered and unknown I
would suggest tracking down the bugs (in UNSAFE code, compiler, C code,
wherever) and fixing them rather than repeating the C programmer's mantra
that SIGSEGV is or ought to be fatal to the point that you need to start
from a clean slate.

This sort of thing is precisely what Modula-3 was invented for!!!!
Why do you think (crazy) people still use the programming language,
fifteen years after it's been declared dead?  

By the way, every year that I teach a class, I always ask the students
what programming languages they use/learn/want to learn.  Over the years
I've seen a steady progression of C++, Java, Python... until last year.
The most popular answer was "C".  I must say it felt a bit odd to be,
technologically, 20 years ahead of people 20 years younger.  Now,
I always used to feel a bit bad about forcing students to study a
"dead" programming language that would not help them in employment,
research, etc.  (Modular-3?  What's that?)  But better than a language
that should be dead.

    Mika



More information about the M3devel mailing list