[mercury-users] Circular lists
Richard A. O'Keefe
ok at cs.rmit.edu.au
Thu Nov 27 15:30:27 AEDT 1997
I guess we could emit a warning every time you return a string from C
code, or pass or return a complex type from C code,
Why are these things dangerous? In Quintus Prolog, passing strings in either
direction was guaranteed safe, thanks to copying. In ESH, a very nice Scheme
system from Sun, passing C data structures to Scheme and back again works
perfectly safely.
but to do anything
more would require impossible analysis of the C code itself (and
separate compilation only makes the problems worse).
You apparently envisage checking arbitrary code;
I envisage checking _checkable_ code. If the code is for some reason
impossible to analyse, that is in itself a danger sign.
More information about the users
mailing list