[m-dev.] delaying compile errors until runtime

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Dec 23 14:10:25 AEDT 1999


On 23-Dec-1999, Mark Anthony BROWN <dougl at cs.mu.OZ.AU> wrote:
> 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.

OK, but this warning would be going to the same place that the errors
messages go to, so if the programmer doesn't notice the error messages,
they are unlikely to notice this warning.

> 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.

That would be better.
I suppose they might notice the warning when they do finally get
the code to compile without errors, and then turn off the option.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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