binary files in haskell
Tue, 6 Feb 2001 15:25:11 +0100 (MET)
Johannes Waldmann wrote:
| Should this also apply to names in the standard
| library? like Monad (filterM, zipWithM ,..) I mean,
| theoretically yes, but is it feasible to change it?
Obviously, these functions should have been called:
The lazy programmer can then say:
import Monad as M (*)
Just (asymptotically) 1 character more! :-)
| getLine -> hGetLine always irritates me.
import Handle as H
(This is a good example where type classes would not help
making this any better, since the types of getLine and
H.getLine are very different.)
While we're at it, how about instead of the "fmap" function:
The programmer can pick him/herself what function to use.
(The Prelude really has too many functions in it, and very
often the rationale for a function being in Prelude or in
Char/List/Maybe/Monad/IO/etc. is not motivated.)
What do people think about this? If people prefer these
stylistic changes, I think we should not hesitate making
them for Haskell/2 by completely redesigning the module
structure and using more consistent naming conventions.
(*) What actually happened to the excellent proposal
somebody made a while ago for Haskell98:
import M = Monad
? I like it a lot!
Koen Claessen http://www.cs.chalmers.se/~koen
phone:+46-31-772 5424 mailto:email@example.com
Chalmers University of Technology, Gothenburg, Sweden