On Wed, 31 May 2000, S.D.Mechveliani wrote:

> And we can hardly invent the mode type better than  Char,
> because any specially introduced mode types bring the long names.
> 
>   quotRem 'n' x (-3)   looks better than the pair  quotRem & divMod,
> and
>   quotRem QuotRemSuchAndSuch x (-3)
>                                  looks worse than  quotRem & divMod.

I suspect that such judgements aren't universal throughout the haskell
community. I prefer the QuotRemSuchAndSuch version for two reasons:

(1) Programming constantly reminds me how small my brain is and how many
trivial mistakes I make. I'm much more likely when looking over/debugging
my code to spot a trivial slip if mode type arguments explanatively
(?) named than if there's a cryptic one character mode argument there.

(2) Having an enumerated type is better because it will cut down on
`accidental namespace collisions' if I cut and paste something which
expects mode character 'n' to mean one thing into a function call where it
means something completely different.

To be fair, there are two minor cons that haven't been mentioned:

(1) Long names, haskell layout rule & current dumb editors are a match
made in hell: I want an editor which understands enough of the layout rule
to choose the most aesthetic layout as I type, even given the difficulties
of long names, with only a few minimal hints.

(2) These enumerated types presumably have to be added to explicit import
lists, even if you're only using the most common type. Much existing
script breakage!

My thoughts at least,

___cheers,_dave________________________________________________________
www.cs.bris.ac.uk/~tweed/pi.htm|I shoulda realised building the 
email: [EMAIL PROTECTED]     |memory allocation subsytem with 
work tel: (0117) 954-5253      |--with-malicious-ai was a bad idea.


Reply via email to