> > The point is, if I *want* to have several behaviours in one run I can always
> > use this second technique. But Haskell as it now stands prevents me from
> > using the first, even when I *don't* want several behaviours in one run.
> > I'd be prepared to pay the pain if I wanted the benefit. Since I don't want
> > the "benefit" I don't want the pain.
>
> First, Simon, I think you're a little biased on this issue. I'm sure that
> making argv a global constant would be a practical benefit for programs like
> GHC, but a compiler is a very specialized application, and exactly the sort
> that takes a huge number of arguments and then threads them to all the little
> nooks and crannies of a program. Most applications are not nearly so
> configurable, and I think there is considerably less burden on the programmer
> when it comes to distributing argument values.
>
I think Simon's bias is towards big systems. The LOLITA Natural Language
Processing system which the group here is working on is 54k lines of Haskell
and we have experience exactly the same kinds of problem that Simon mentions.
Also, Sverker Nilsson wrote:
> performOnceBeforeMain:: IO a -> a
>
> timeStarted = performOnceBeforeMain (getCurrentTime)
>
> Just like that one would do with unsafePerformIO, but with
> safer semantics (hopefully) and blessed by Standard Haskell.
This doesn't look very safe to me if performOnceBeforeMain get's called
more than once.
Rick