Proposal: unify constant functors

wren ng thornton wren at freegeek.org
Fri May 4 01:17:18 CEST 2012


On 5/2/12 6:36 AM, Conor McBride wrote:
>
> On 1 May 2012, at 19:43, Edward Kmett wrote:
>
>> +1 for going Brent and Ross's way, (removing Const from Control.Applicative and moving Data.Functor.Constant into base) but overall happy with the idea no matter how we do it.
>
> I think this is sensible, but I'm mildly inclined to plead for a much
> shorter name: K. I realise it would be completely inappropriate to
> use convenient names based on combinatory logic in a programming
> language called Haskell, but frankly, every time I have to type
> "onstant" I feel like giving someone a "dentity".

Indeed. I'm fine with Const (we don't call the value-level function k, 
afterall), but Constant is just too much. Ditto for the excessively 
lengthy naming of the identity functor. For things this basic and this 
widely used, all that verbosity gives me flashbacks to coding in Java.

I don't think I'll argue for the combinatory names, but I certainly 
wouldn't argue against them either.

-- 
Live well,
~wren



More information about the Libraries mailing list