"Data.TupleFields" for review
naesten at gmail.com
Thu Aug 9 10:02:28 EDT 2007
On 8/9/07, Ketil Malde <ketil at ii.uib.no> wrote:
> On Wed, 2007-08-08 at 22:30 -0400, Samuel Bronson wrote:
> > -- This module provides tuple field access similar to ML's #1, #2 etc.
> Perhaps the naming could be improved?
> Lisp calls these first, second, third, etc and nth for the general case.
> (Ignoring the more esoterically named car, cadr, etc, and the fact that
> they operate on lists)
> Also, I presume the abbreviations are _u for update, _s for set? Unless
> this goes into a standard library (replacing fst and snd?) and thus
> becomes ubiquitously used, I'd prefer less cryptic names, perhaps
> mapFirst, setSecond, etc. I think 'map' gives the correct connotation,
> rather than 'update'.
The only convention I'd seen for this when I picked those names was
the one that DrIFT implements, so that's what I used. I've since
learned that Derive implements a different convention, with names like
setFoo where DrIFT would have foo_s, though it doesn't seem to have an
equivalent for foo_u. I'm not sure I want map; perhaps some variant of
> (Private reply only, as the list won't accept mail from an address the
> MUA will let me use. Feel free to cite in public.)
How do you know that the list won't accept mail from your address?
More information about the Libraries