Home
Feedback
FAQ
Getting Started
Discussions
Site operation discussions
Recent Posts
(new topic)
Departments
Courses
Research Papers
Design Docs
Quotations
Genealogical Diagrams
Archives
Oleg Kiselyov wrote a mail to haskell-cafe today titled, The IO Monad is 45 years old. I thought LtU readers might like this.
As Neel has pointed out here on LtU, monads are at least 62 years old.
Certainly 'modalities' in logic are at least 62 years old (in fact, several centuries old, as Leibniz was well aware of them). But to thereby jump to monads (as type constructors satisfying certain laws) via the Curry-Howard correspondance asserts too much clairvoyance on our (otherwise brilliant) mathematical ancestors. Curry understood that he was seeing something interesting and important, but to say that he saw a 'monad' is too much. (Read it yourself, chapter 5 of A Theory of Formal Deducibity).
Oleg's claim that the IO Monad is 45 years old is much better supported by Landin's text. Landin did not see 'monad', but he definitely saw all the operational details of the IO Monad, in a denotationally very clear manner.
I didn't realize that his notes were available online -- thanks for the link.
That is 1948-9, baby boom days after WWII ended.
Landin's implementation of state threading is not very accurate - it depends on applicative-order evaluation, in particular side-effects in the discarded argument of the K combinator. Also the token representing the state of the world is discarded and regenerated, which rather undermines the whole point.
Algol 60 | Lambda Calculus x:= 2; | ( (\() -> K () (assignandhold x 2)) . x:= -3; | (\() -> K () (assignandhold x (-3))) ) ()
A correct implementation needs to change the assignandhold function to take the state of the world as an argument and return it. There's no need for games with the K combinator. Then function composition threads the world through directly.
( (\world -> assignandhold x 2 world) . (\world -> assignandhold x (-3) world) ) world
i.e.
( (assignandhold x 2) . (assignandhold x (-3)) ) world
Recent comments
22 weeks 6 days ago
22 weeks 6 days ago
22 weeks 6 days ago
45 weeks 19 hours ago
49 weeks 2 days ago
50 weeks 6 days ago
50 weeks 6 days ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago