5 ms·
Lisp is a multi-paradigm language that's perfectly capable of representing state. Perhaps you're confusing it with some purely functional language like Haskell
by gnosis 14y ago
Lisp is a multi-paradigm language that's perfectly capable of representing state. Perhaps you're confusing it with some purely functional language like Haskell.
- david927 14y agoI'm not saying it can't represent state; I'm saying that it promotes avoidance of state as a virtue.
- gnosis 14y agoOne of the reasons avoiding state is promoted is to make it easier to write robust software. State is too often the enemy of robustness.
- larholm 14y agoAnd robustness is often the static plastic bubble that hides in itself, never accomplishing much in the real world. State is too often the real world. Mind you, I like robustness. It's like the cinder blocks I use to build my house, each robust and contained in itself. I just can't disregard state when stacking my cinder blocks on top of each other; the flexing and distribution of load is an emergent state that I have to consider when building each cinder block.
- nightski 14y agoSo to be clear here I assume you are talking about mutable state. Even if that is the case, it is not about avoiding state at all. It is about managing it explicitly.
- jerf 14y agoI translate your first paragraph to "I have never used Haskell" in my head. The idea that Haskell is somehow about not doing anything because it can't do state is just silly. It doesn't pass the smell test. People do not write web frameworks or compilers or anything in a language that "can't do anything" because it can't do state. Haskell is not about "not touching state". That's just objectively wrong. It may not work exactly like you are used to, you may not like the tradeoffs, but Haskell can do things. I know, because I can make it do things.
- kristiandupont 14y agoI would say that it is. Mutable state in software is like moving parts in hardware. It's often necessary, but it makes everything a bit more fragile.
- jeffdavis 14y agoAvoidance of state in general is a pretty ridiculous claim to make. Even when writing pure functions, the state consists of all of the arguments to all of the functions up the stack.
- dons 14y ago... of course Haskell is perfectly capable of representing state too ...