« The von Neumann Bottleneck | Main | One Big Ambient Monad »

July 01, 2009

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d83451ce5a69e20115719baad0970b

Listed below are links to weblogs that reference The Problem with Immutability:

Comments

Tony Morris

You have missed the point completely. "We live in an imperative world where there's state and things are mutable." This statement is wildly untrue true and sets the premise for the remainder of your error.

Second, monads have nothing to with I/O. You use monads in your favourite programming language, whether you know that or not.

Java has a couple of monads: the semi-colon and the throws keyword. C has the semi-colon, C# has monad comprehensions (LINQ). Whether you're aware of this or not is the important point. What is not important is whether or not you are using monads (since you are -- get used to it).

Although Java is perhaps the most impractical language on the planet, you would at least benefit from understanding some of its fundamental underpinnings should you be forced to use it. This is why I am compelled to point out that you have made an error, and not just a little one.

It would help for you to understand what this "monad" word means to prevent future error.

I am happy to teach you in your favourite language if you like, but like I said, it is not a very practical language and so presents unnecessary barriers. I hope this helps.

tinou

hi tony,

thanks for the comments. my blog is a flushing ground for random thoughts, so during this flushing process it wouldn't surprise me at all if everything i said is completely wrong.

can you expand on a couple of the things you said. the world is stateful/mutable seems so apparent to me, but maybe i have a different (incorrect?) understanding of what state means. last month i was listening to a conversation with gilad bracha and he said this regarding regarding functional vs. imperative:

"[people] don't know how to break it [problems] down into functions and their perception of it is stateful; it often is. i mean i'm looking at you right now, and i know it's not really you any more, it's a new you that just got reconstituted. but most people have this idea that it really is you. memory is important. so throwing out state makes life a lot simpler but very often creates a problem in modeling things. and if you really, really understand something you can usually throw away the state but it is often very hard. you need to have both, but you need to be close to functional as you can."

that's what i meant when i said the world is imperative and has state and is mutable.

the monad thing. i mentioned monad only to put micahel scott's quote in context. i'll defer to you on exactly what monads are, since i for sure don't know the complete story on monads, except that everytime i read about IO I see monads. maybe that'll be my next blog: WTF is a monad?!?

Mentics

Regarding the immutable world. I found this thought interesting: the world is not imperative, but it is reactive. I was reading about functional reactive programming, and that seems to get closer to modeling the real world since it sets up the "physics" of a program declaratively. How things interact. And then you say go, and your application "just works" because the interactivity/dataflow is defined.

The comments to this entry are closed.