[m-dev.] delaying compile errors until runtime

Mark Anthony BROWN dougl at cs.mu.OZ.AU
Thu Dec 23 13:57:47 AEDT 1999


Fergus Henderson writes:
> 
> On 23-Dec-1999, Mark Anthony BROWN <dougl at cs.mu.OZ.AU> wrote:
> > > 
> > > On 22 Dec, Fergus Henderson wrote:
> > > > It might be nice to add an option to the Mercury compiler
> > > > that would cause it to go ahead and generate executable
> > > > code anyway, even if compile errors were found.  The generated
> > > > code would then raise exceptions at runtime, if/when it was
> > > > executed.

> > I think the use of this
> > option should generate a warning, regardless of whether any compile
> > errors were found.  It's also probably worth generating a warning
> > any time such code is called, like we do for obsolete predicates.
> 
> Hmm, I'm so sure about the merits of these.  I think they might
> end up just being noise rather than useful information.

Fair enough.  My concern is that the option could be added to the
Mmakefile during development (when the code is incomplete), but
when the code gets finished the option may be inadvertantly left on.
Later changes can introduce bugs that the programmer may not notice
because compilation is still successful.  Note that this is
less likely to happen if the information appears in the source code,
like with Peter's suggestion.

Perhaps instead there should be a warning generated if the option
is used unnecessarily---that is, if the option is used but there
are no compilation errors.

Cheers,
Mark
-- 
Mark Brown, PhD student            )O+  |  "Another of Fortran's breakthroughs
(m.brown at cs.mu.oz.au)                   |  was the GOTO statement, which was...
Dept. of Computer Science and Software  |  uniquely simple and understandable"
Engineering, University of Melbourne    |              -- IEEE, 1994
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list