[m-rev.] for review: arrays and the debugger

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon Jun 18 15:22:10 AEST 2001


On 18-Jun-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> Hmm... limited_deconstruct would only be used when pretty-printing,
> wouldn't it?  I don't think that is likely to be performance-critical.

First, pretty-printing of large data structures may sometimes be useful,
e.g. for debugging. Second, why constrain a potentially generally useful
facility just because you can't think of another use right now? Maybe your
current location is influencing your thinking :-)

> Also, you don't need to do the test for all types, it's enough to do it
> just for arrays.

Testing the type just so you can avoid another test is not a good idea.
Not all applications, even in prettyprinting, would test the type anyway,
so the type test is not always free.

You are arguing for a more limited solution than I have implemented, and
for perpetuating the inefficiency currently in functor and deconstruct,
which my change eliminates. My change also *improves* consistency wrt what
fields are filled in in what circumstances. Do you think the avoidance of
multiple copies of functions is *that* important?

Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list