On Mon, 9 Jun 2008, Sebastian Sylvan wrote:
Another BIG reason: It's impossible to export a whole hierarchy qualified.
I.e it would be neat if the user could write:
import Graphics.UI.Gtk
And then have Gtk re-export sub-modules qualified, so you could write
"Button.new", "Window.new" etc. etc. As it stands you have two options:
prefix all the "new" functions with the kind of widget they create
(buttonNew, windowNew), or force the user to add a gazillion qualified
imports.
The problem would be again that no one knows, where "Window" comes from. Better would be
I really don't see how this is a big problem. Lots of languages do hierarchical import (e.g. .Net languages) and I don't think I've ever heard anyone complain about this particular aspect of it. The worst case scenario is that you need a little bit of tool support to help you sort it out. Plus, it's not like you can't just qualify the import to make it easier to see where it comes from if you really think it's a problem:
import qualified Graphics.UI.GTK as GTK
and then use GTK.Button.new etc.