[Haskell-cafe] Functional references

Ryan Ingram ryani.spam at gmail.com
Fri Sep 5 19:21:29 EDT 2008

On Fri, Sep 5, 2008 at 1:39 PM, Henning Thielemann
<lemming at henning-thielemann.de> wrote:
> Haskell already supports qualification, why manual prefixing?

This is just a stylistic opinion, but I absolutely hate "required"
qualifications; it is a waste of typing and, in my opinion, it makes
the resulting code look more cluttered and harder to read.

It's especially bad when modules are extremely likely to be used
together, like Control.Monad.State & FRef, or Data.Map & the Prelude.
You end up being required to import one or the other qualified.

I direct you to my proposal for ad-hoc overloading, recently discussed
on this list, as a way to solve this problem.  In my experience, the
code is almost always unambiguous without the qualification because
using the "wrong" operator would fail to typecheck.

In this case, I agree that manual prefixing isn't really better, but
using ugly names encourages people to find better ones.  I couldn't
think of any off the top of my head, but I wasn't trying very hard.

  -- ryan

More information about the Haskell-Cafe mailing list