3 ms·
Quite a good explantion - the idea of having immutable data is a really strange one to wrap your head around when you have been doing OO for most of your career
by Sapient 17y ago
Quite a good explantion - the idea of having immutable data is a really strange one to wrap your head around when you have been doing OO for most of your career.
I'm just getting into clisp (I read somewhere that it is inevitable that everyone on HN will eventually try lisp when they have been around long enough) at the moment, and would like to try my hand at some Haskell later as well, and one of the hardest things to do is to think of data in FP terms.
- tumult 17y agoYou think it's weird now, wait until you start building infinite lists or writing recursive functions with no terminating case as part of your everyday routine in Haskell :)
- mapleoin 17y agoyou can do that with python generators, too. These don't seem like the most eccentric Haskell features to me.
- tumult 17y agoDon't generators have to yield in order to return data? And I never claimed these were eccentric features.
- deleted 17y ago[deleted]
- tel 17y agoTake a look at Parsec sometime. Sure, you can do parsers in any language, but the monadic/combinator structure is a little bit eccentric and a lot amazing.
- Sapient 17y agoHeh, one step at a time... Those sound like they can produce headaches.