[m-dev.] Update library pragma C code

Peter Schachte pets at students.cs.mu.OZ.AU
Tue Aug 4 13:19:31 AEST 1998


On Tue, 4 Aug 1998, Thomas Charles CONWAY wrote:

> > > These and all the others in math.m are missing `will_not_call_mercury'.
> > I rest my case.
> In that case I win! :-) Those problems were due to the default changing
> (and the duplication of the c code for pred and func versions), not to
> programmers making the wrong assumption.

I was being a bit flip, but my point was that forgetting to put in
will_not_call_mercury is an error, too (a performance bug).  It's a less
important bug, but it is also much, much harder to find.  It is important to
get this attribute correct, either way.  Making people always write it one
way or the other, or making them usually write it by making the rare case
the default, won't make it much (if any) more likely that they'll get it
right, because the problem is one of thinking (and maintenance), not one of
typing. So in that case it makes more sense to either (a) make the default
the most common case or (b) make people declare when they're using some well
documented feature where the manual can tell you that you need to make a
certain declaration.  In this case both of these choices are the same. 


-Peter Schachte               | A language that doesn't have everything is
mailto:pets at cs.mu.OZ.AU       | actually easier to program in than some that
http://www.cs.mu.oz.au/~pets/ | do.
PGP: finger pets at 128.250.37.3 |     -- Dennis M. Ritchie 




More information about the developers mailing list