[m-dev.] for review: add MC++ implementation of library and runtime

Tyson Dowd trd at cs.mu.OZ.AU
Tue Dec 5 23:27:41 AEDT 2000


On 05-Dec-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 05-Dec-2000, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> > Lots of review comments have been of the form:
> > 
> > "What happens when ...."
> > "Why don't you ... "
> > "Surely there's a class method for ..."
> > "Can't you just ..."
> > 
> > The answer to all of these is "I don't know" or "This seemed to work
> > at the time".
> > 
> > I've asked exactly the same questions while I was writing the code.
> > 
> > On average to answer questions like this it has taken 1 hour per
> > question.  This is because the documentation is often non-existant or so
> > vacuous that it is useless, the class libraries are written to ad-hoc
> > specifications (e.g. no attempt at POSIX compatibility or other useful,
> > "complete" standards) and the runtime system itself gives poor error
> > messages.
> 
> OK, in that case we may find that it takes a long time to fully
> implement the IL version of the library.
> 
> This diff need not implement the complete library.  What we need to do
> with the prototype is just to make sure that for all the places where
> we are not sure what to do, we (a) mark them with an XXX so that we
> know to go back and revisit them and (b) make sure that things will
> fail cleanly (e.g. calling SORRY()) rather than working most of the
> time and then failing nastily in rare cases.
> 
> Note that debugging the cases where something works most of the time
> but occaisionally fails will typically cost a lot more than one hour
> per bug.

This is pretty much what I ended up doing (although I didn't start this
way, and there is still some code in there that has never been run or is
a bit incomplete and doesn't call SORRY when it should).

Something we really need is unit tests for all the library modules.
This would make it far easier to test.

Hmmm.... quickcheck anyone?

-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
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