[Haskell-cafe] some ideas for Haskell', from Python

Artyom Shalkhakov artyom.shalkhakov at gmail.com
Thu Jan 15 23:22:58 EST 2009

Hi Immanuel,

2009/1/15 Immanuel Litzroth <immanuel203 at gmail.com>:
> In Python importing a module has totally different semantics from importing
> in Haskell.
> I runs the initialization code for the module & makes the names in that
> module
> available to you code. In Haskell modules are just namespace control, and
> you can always
> refer to names imported through import X through the syntax X.name.
> This means that the local import in Python solves two problems
> 1) making a name available locally.
> 2) running initialization code only when a specific function is called.
> Neither of those makes any sense for Haskell as far as I can tell.

Well, how about extensible programs? XMonad uses run-time module
loading to remain configurable. I think this approach is much better than
the ill-defined, partially-specified configuration files used by e.g. Apache,
wpa_supplicant, and other widely used programs.

Artyom Shalkhakov.

More information about the Haskell-Cafe mailing list