[M3devel] [M3commit] CVS Update: cm3

Mika Nystrom mika at async.async.caltech.edu
Sun May 9 01:55:53 CEST 2010


Jay K writes:
>
>It's not a closed system. Modula-3 can call C can call C++ can call Modula-=
>3=2C etc.=2C and they can call raise exceptions.
>I'm not sure what the C exception story is on all platforms=2C but at least=
> on Windows there is RaiseException.
>
>Green book doesn't mention m3-libs/m3core/src/Unix=2C but it exists anyway.
>
>=A0- Jay

Well the fact that there is no specification means there's no definition
of what behavior is "correct."  I think it's up to the user of the 
primitives to ensure he's not breaking anything, if it's not defined 
in the Book.

Surely the way to deal with it is to make the user simply guarantee
that whatever C routines he calls will in fact conform with Modula-3's
parameter passing and exception behavior.  

So it would be nice to document how one goes about writing a C program
so that it conforms with (a particular implementation of) Modula-3's
conventions.  But changing the signal mask?  Maybe such a programmer
shouldn't be programming in Modula-3, not if his demands on M3 cause
things to slow down significantly for users who are writing their code
mostly in Modula-3.  (As far as I know there's no real reason to write
your code in C if you can use Modula-3, not sure about C++.)

    Mika



More information about the M3devel mailing list