[m-dev.] For review: small addition to list.m

Ralph Becket rbeck at microsoft.com
Wed Oct 4 02:56:08 AEDT 2000


>From Fergus Henderson on 03/10/2000 16:48:52
> > library/list.m:
> > 	Added pred list__det_head_tail/3.
> 
> There's nothing wrong with that change (except that you forgot
> to mention the new function in the NEWS file), but on principle I vote
> against adding that one to the standard library, on the grounds that
> we shouldn't add functions to the standard library unless they are
> going to be widely used, and thus far I don't recall off-hand any
> occaision on which I would have wanted to use list__det_head_tail/3.

Fergybaby, you're just doing it wrong!

This sort of thing crops up all the time in my code.  I
suspect that if I wanted to double the size of my programs
I could use the mode system to get rid of a good half of
the occasions when I know I've got a non-empty list and I
really want to decompose it into head and tail.  Or,
alternatively, I could check everywhere that I wasn't passing
an empty list around and throw an exception and HNNGNNNGH!

I vote this should go in since it's a natural companion for
list__det_{head,tail}/1.

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