3 ms·
As fishnchips says, Haskell is more of an introspective journey imo. Like, Monads are fucking weird. Until you realize that monads are more about dealing with
by tetha 3y ago
As fishnchips says, Haskell is more of an introspective journey imo.
Like, Monads are fucking weird.
Until you realize that monads are more about dealing with context and making data-dependencies and side-effects explicit.
And then you start realizing how most application server frameworks are about a simple task: The framework decomposes a possibly multi-threaded server into single-threaded request handling. And then does a shit-ton of other heavy-lifting for you.
Or, on the other hand, currying is a weird thing. Until we had a decorator which takes some initial parameters and transforms every incoming thing based on these parameters. It's a decorator in java, it's currrying in Haskell.
I've learned a lot from Haskell, ML, SML and OCaml as well as Haskell at a meta-level. We've written a full compiler in OCaml in one course, and then I made it assemble microcode instructions later on as well, because it made exercies easier in that other course.
But I wouldn't do that in production. Other languages are easier to comprehend for other people.
- fishnchips 3y ago> currying is a weird thing Is it? I think it's actually extremely elegant. A function has exactly one input and returns exactly one output. If you need two inputs, you have a function that takes one input and returns a function that takes one input and produces the output. Functions that look like they have multiple inputs are just syntactic sugar.