16 Jan 05:22
Re: some ideas for Haskell', from Python
Artyom Shalkhakov <artyom.shalkhakov <at> gmail.com>
2009-01-16 04:22:58 GMT
2009-01-16 04:22:58 GMT
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. Cheers, Artyom Shalkhakov.
RSS Feed