[Haskell-cafe] Re: Are there standard idioms for lazy, pure error handling?

Neil Brown nccb2 at kent.ac.uk
Thu Dec 3 06:53:01 EST 2009


wren ng thornton wrote:
> Nicolas Pouillard wrote:
>> Excerpts from Heinrich Apfelmus's message of Tue Dec 01 11:29:24 
>> +0100 2009:
>>> For mnemonic value, we could call it a "train":
>>>
>>>    data Train a b = Wagon a (Train a b)
>>>                   | Loco  b
>>
>
> I rather like it too. The mnemonic version sounds a lot nicer than 
> "ListEnd", though I'd probably call the constructors Cabin and Caboose.
I suspect the Train name runs into cultural differences.  Cabin and 
Caboose are not names I know in relation to trains, and even Wagon and 
Loco don't immediately convey to me which one is which.  I think a more 
obvious Cons/Terminator naming scheme is best.

Neil.


More information about the Haskell-Cafe mailing list