[Haskell-cafe] Re: [Haskell] Top Level <-
ahey at iee.org
Tue Aug 26 16:47:18 EDT 2008
Lennart Augustsson wrote:
> Making a network stack from peek and poke is easy in a well structured OS.
> The boot loader (or whatever) hands you the capability (call it
> something else if you want) to do raw hardware access, and you build
> from there. If you look at well structured OSs like NetBSD, this is
> pretty much how they work. No hardware drivers use global variables.
So? We all know this is possible outside Haskell. But I don't want to
rely on mysterious black box OS's to "hand me the capability" any
more than I want to rely on mysterious extant but unimplementable libs
like Data.Unique. Most real world computing infrastructure uses no OS at
all. How could I use Haskell to implement such systems?
Also (to mis-quote Linus Torvalds) could you or anyone else who agrees
with you please SHOW ME THE CODE in *Haskell*! If scripture is all
that's on offer I'm just not going to take any of you seriously.
Frankly I'm tired of the patronising lectures that always acompany these
threads. It'd be good if someone who "knows" global variables are evil
could put their code where their mouth is for a change. Fixing up
the base libs to eliminate the dozen or so uses of the "unsafePerformIO
hack" might be a good place to start. I'll even let you change the API
of these libs if you must, provided you can give a sensible explanation
why the revised API is better, safer, more convenient or whatever.
More information about the Haskell-Cafe