Live data from Hacker News

Pedagogical Downsides of Haskell

ciobaca.substack.com

101–110 of 118 posts

Re: Pedagogical Downsides of Haskell

#101

The pedagogical downside of Haskell is that it ignores the physical reality of the machine. Physically, a computer is imperative, has mutating state, and is filled with all kinds of possible race conditions. Even after you apply the operating system, allowing processes to live together (and giving you space to define new ones), very few constraints are placed on your program and process space. Instead of building on…

> Haskell's power users famously don't actually make anything with it This is a lie that you're perpetuating. Myself and many of my friends, colleagues, and associates make a living writing Haskell.

What kind of things do you use it for?

Re: Pedagogical Downsides of Haskell

#102

Earlier quoted context omitted.

> Haskell's power users famously don't actually make anything with it This is a lie that you're perpetuating. Myself and many of my friends, colleagues, and associates make a living writing Haskell.

What kind of things do you use it for?

I write software for the reinsurance industry at Supercede[0].

[0]: https://supercede.com/

Re: Pedagogical Downsides of Haskell

#103

Earlier quoted context omitted.

I find the terminology that Haskell uses quite misleading for software engineering. It borrows concepts from category theory with quaint names such as a "monad", "endofunctor", "catamorphism", etc. The problem is that, instead of a "monad", we can say "brrrdogcogfog" and nothing will change -- the name is absolutely irrelevant to the problem being solved. Given that a monad is an interface for sequential computation,…

> Given that a monad is an interface for sequential computation, a much better name would be something like "Seq", "SeqComp", or something like that. Just because you can look at something as describing a computation doesn't mean you always should. For example: data BinaryTree x = | Leaf x | Node (BinaryTree x) (BinaryTree x) instance Monad BinaryTree where return :: a -> BinaryTree a return x = Leaf x bind :: (a ->…

The tree is a tree, but the Monad instance is sequencing modifications to the tree.

Re: Pedagogical Downsides of Haskell

#104

Earlier quoted context omitted.

I find the terminology that Haskell uses quite misleading for software engineering. It borrows concepts from category theory with quaint names such as a "monad", "endofunctor", "catamorphism", etc. The problem is that, instead of a "monad", we can say "brrrdogcogfog" and nothing will change -- the name is absolutely irrelevant to the problem being solved. Given that a monad is an interface for sequential computation,…

> Given that a monad is an interface for sequential computation And what the hell is an interface for sequential computation? I think I understand what these Maybe types are and what they accomplish but "interface for sequential computation" sounds a lot like those buzzwords people mix together that could mean anything.

It's an API for ensuring work gets done in a specified order.

Like opening the jar before sticking a knife into the peanut butter.

Re: Pedagogical Downsides of Haskell

#105

Earlier quoted context omitted.

I find the terminology that Haskell uses quite misleading for software engineering. It borrows concepts from category theory with quaint names such as a "monad", "endofunctor", "catamorphism", etc. The problem is that, instead of a "monad", we can say "brrrdogcogfog" and nothing will change -- the name is absolutely irrelevant to the problem being solved. Given that a monad is an interface for sequential computation,…

Composition/SeqComp comes for free. A monad is how to wrap something up,apply a function to the wrapped up thing, and how to unwrap it.

Composition is not sequential in a pure, lazy language with a graph reduction runtime like Haskell.

Re: Pedagogical Downsides of Haskell

#106
post #51

I find its syntax & idiomatic style incredibly difficult to follow, in a way nearly no other languages have been for me, including some functional languages (OCaml doesn't seem nearly as bad to me, for instance). It's sometimes implied that those who trip over Haskell just aren't big-brained enough to understand various important concepts related to it, but I've found they're usually very easy to grasp, provided the…

I suspect you are right that there's a type of person Haskell feels very intuitive to. I think if your mind works that way you might have a hard time appreciating the degree of confusion "regular" programmers face when trying to decipher the mess of symbolic soup.

Regular programmers were pretty happy with Perl soup.

Re: Pedagogical Downsides of Haskell

#107

The pedagogical downside of Haskell is that it ignores the physical reality of the machine. Physically, a computer is imperative, has mutating state, and is filled with all kinds of possible race conditions. Even after you apply the operating system, allowing processes to live together (and giving you space to define new ones), very few constraints are placed on your program and process space. Instead of building on…

One of the more surprising aspects of GHC Haskell is that it is possible to write a very high level code with performance matching or exceeding code written in a low level language, thus honoring the machine. Stream fusion for an example. Not sure if there is any other language with higher abstraction/performance ratio.

Unfortunately, one space leak (extremely east to accidentally create in Haskell, much harder to debug than in other languages) cancels out all those benefits.

Re: Pedagogical Downsides of Haskell

#108
post #104

Earlier quoted context omitted.

> Given that a monad is an interface for sequential computation And what the hell is an interface for sequential computation? I think I understand what these Maybe types are and what they accomplish but "interface for sequential computation" sounds a lot like those buzzwords people mix together that could mean anything.

It's an API for ensuring work gets done in a specified order. Like opening the jar before sticking a knife into the peanut butter.

Yeah, well, so is every programming language ever created. When I write any code at all, it's to ensure the instructions are laid out in the correct order for the computer to execute.

Re: Pedagogical Downsides of Haskell

#109
post #82

Earlier quoted context omitted.

That sounds almost as vague to me as “object” does in OOP. Don’t non-monadic functions also consist of expressions that describe computations?

Everything is vague. Hell, Haskell functions are not really functions in the mathematical sense.

To me, “computation expression” is significantly more vague than “function” is in Haskell. “Seq” as was suggested by someone else here seems clearer. But I would genuinely be happy to understand the F# point of view on this better.

Re: Pedagogical Downsides of Haskell

#110

The pedagogical downside of Haskell is that it ignores the physical reality of the machine. Physically, a computer is imperative, has mutating state, and is filled with all kinds of possible race conditions. Even after you apply the operating system, allowing processes to live together (and giving you space to define new ones), very few constraints are placed on your program and process space. Instead of building on…

Screw the machine. As long as you can transform one formalism to another, why encumber the human mind with needlessly complicated ones?
Post reply on HN