IO is important because you can't write any real program without using it.
Ouch! I get awfully discouraged when I read statements like this one. The
more people who believe it, the more true it becomes. If you want to do
functional programming, instead of imperative programming in a
Am Sonntag, 9. Dezember 2007 18:31 schrieb Conal Elliott:
IO is important because you can't write any real program without using
it.
Ouch! I get awfully discouraged when I read statements like this one. The
more people who believe it, the more true it becomes. If you want to do
Conal,
It's true that you can avoid using IO (except for a wrapper) for certain
kinds of programs.
For instance, if all you want is a String-String function, or some GUI
program (you forgot to mention fudgets, which was the first wrapper of this
kind) then you can ignore IO and just use a nice
Thanks. If I'm tracking, your real point is that imperative programming in
Haskell is still useful enough to keep around. I agree.
I'm still puzzled. Did you understand something I said, or maybe someone
else said, as suggesting that imperative programming be removed from Haskell
any time
I doubt all imperative programming will be banished from Haskell anytime
soon. I really, really wish we had all the nice abstractions in place
already, but we just don't.
You can't write any program in Haskell without using IO, because the type of
main involves IO.
And currently I believe that
It so happens that Haskell currently insists on main :: IO (). That's
simple to fix, however, and with great pay-off. Suppose instead main :: TV
a (where I'm omitting the other TV type args for simplicity.) Then a
program could not only be run, but also composed with other programs. They
could
I agree with Dan here.
IO is important because you can't write any real program without using it.
So why not teach enough of it to get people off the ground straight away?
People who hang around long enough to do some more Haskell programming
will run into the other monads sooner or later. But
On Dec 3, 2007 6:36 PM, Ben Franksen [EMAIL PROTECTED] wrote:
then the special features of IO
will remain associated with monads in general, leading to a whole jumble of
completely wrong ideas about them.
As I only learnt about monads a couple of years ago, the process is
still fresh in my