[Haskell] Re: RFC: DData in hierarchical libraries
Daan Leijen
daanleijen at xs4all.nl
Fri Mar 12 15:28:32 EST 2004
Simon Marlow wrote:
> Just as a matter of personal preference, I find a right bias
> to be more intuitive. Also, if the map argument comes first
> in 'insert map key x', then partial application is more
> likely to be useful (you're more likely to be inserting
> several things in the same map, rather than the same thing in
> several maps).
This makes a lot of sense!, even when it is inconsistent with
"List.elem" (we could argue that List.elem is just wrong :-)
So we can do supposedly common things like:
any (member s) xs
map (lookup m) ks
(But I think I can also come up with partial applications where
the current design is nicer so I don't think we should get into
long discussions about which partial application occurs more often
unless we can back it up with data :-)
Personally, at the moment, I like "right-bias with structure arguments
coming first"
more -- so if many others like it better too, I might be persuaded to
adapt
the implementation. However, this requires quite a bit of work, so I
would like
to leave this issue open for discussion for a while.
All the best,
Daan.
More information about the Libraries
mailing list