[m-rev.] diff: improve mmake support for high level data on IL backend

Ralph Becket rbeck at microsoft.com
Mon Jul 23 20:06:02 AEST 2001


> From: Fergus Henderson [mailto:fjh at cs.mu.OZ.AU]
> Sent: 23 July 2001 10:06
> 
> On 18-Jul-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> > Index: compiler/modules.m
> ...
> > +write_dll_dependencies_list(Modules0, DepStream) -->
> > +	{ F = (func(M) =
> > +		( if M = unqualified(S), mercury_std_library_module(S)
then
> > +			unqualified("mercury")
> > +		else
> > +			M
> > +		)
> > +	)},
> > +	{ Modules = list__remove_dups(list__map(F, Modules0)) },
> > +	list__foldl(write_dll_dependency(DepStream), Modules).
> 
> It would help to use more meaningful names here.  I think it would be
> clearer if the function `F' was written as a separate function, named
say
> "module_dll_name", rather than as a lambda expression.

I'd say that was very legible code.  If module_dll_name were only to be
used in this one place, using a lambda seems reasonable to me given that
it's such a small function.

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