[M3devel] SEGV mapping to RuntimeError
Mika Nystrom
mika at async.caltech.edu
Sun Feb 20 01:13:14 CET 2011
Jay K writes:
>--_1802b75d-f353-43c9-bd6c-02a34e2b7ae8_
>Content-Type: text/plain; charset="iso-8859-1"
>Content-Transfer-Encoding: quoted-printable
>
>
>Modula-3 doesn't live in a vacuum.
>The vast majority of surrounding code is C and C++.
>There are bugs everywhere.
> - Jay
It's rather up to the programmer using it, isn't it? If you write your
code in pure Modula-3, you should be able to rely on the guarantees of
the Green Book (and therefore that SIGSEGV means something relatively
specific, not that "the world just ended"). If you insist on linking
with broken C and C++... well you get what you deserve, probably best
not to try to handle RuntimeError.E in that case.
In any case, to an interactive user of my Scheme interpreter it is very
useful that a NIL dereference drops him at the read-eval-print loop
rather than killing the world. E.g., if as I had yesterday, a 1-gigabyte
datastructure parsed in memory, and I lost the world because I happened
to try to set-car! on a null list somewhere.
Mika
More information about the M3devel
mailing list