[m-dev.] for review: use readline in browser/

Mark Anthony BROWN dougl at cs.mu.OZ.AU
Fri May 28 12:41:32 AEST 1999

Fergus Henderson writes:
> On 27-May-1999, Mark Anthony BROWN <dougl at cs.mu.OZ.AU> wrote:
> Did you consider the possibility of
> 	(a) using global variables for both, i.e.
> 	    making the output stream a global variable too
> or	(b) using parameter passing for both, i.e.
> 	    passing the input and output streams down through
> 	    util__trace_getline and MR_trace_getline() to readline()
> ?
> I'm happy to leave the final judgement of which of these
> three possibilities is the most elegant (and/or least work ;-)
> up to you, but I'd like to be sure that you have at least
> considered those options.

The way I implemented it was the least work ;)

I didn't consider using global variables for both.  I did consider
passing I/O streams through MR_trace_getline, but I avoided
that simply to avoid forcing further changes in the internal

IMHO, it is a better design to avoid relying on global variables, so
it is probably worth the extra effort to pass the streams through.
I'll post a relative diff soon ...

> > browser/interactive_query.m:
> >       [...] reorder some
> > 	arguments to ml so that the ml options are before the '-o'.
> That's really an unrelated change; it might be better to commit
> that one separately.

OK, I've committed it now.

Mark Brown  (dougl at cs.mu.oz.au)       )O+   |  For Microsoft to win,
MEngSc student,                             |  the customer must lose
Dept of Computer Science, Melbourne Uni     |          -- Eric S. Raymond
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