[m-dev.] for review: clean up MLDS init functions

Ralph Becket rbeck at microsoft.com
Thu Nov 9 20:44:57 AEDT 2000


>From Fergus Henderson on 09/11/2000 04:16:10
> Hmm, could you be more specific?
> 
> Using the pretty-printing library would help us format the output
> to some reasonable number of columns.  But I don't think it would
> make much difference to the readability or maintainability of
> mlds_to_c.m itself.  (That module is performing a fairly simple
> task, since the MLDS is already pretty close to C, so I think it
> would be fairly readable and maintainable regardless of how we
> do the output.)

In my experience, when doing a lot of formatted output, it's easier
to see what's going on in the code using pprint rather than line
after line of `io__write_XXX'.

> > Or is that taking a sledgehammer to a walnut?
> 
> Probably.  Anyway last time I looked, the pretty-printing library
> has exponential performance for large outputs.  So we'd need to fix
> that problem first.

No, I fixed that ages ago to use bounded lookahead.  The first
version was indeed exponential, but now it laughs in the face of large
terms.

Ralph

--
Ralph Becket      |      MSR Cambridge      |      rbeck at microsoft.com 

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