News for hackers. Stuff that matters.
Re:Exotic List Monads by gizmo686 on Thursday January 07, 2021 @09:14PM (#25680619)
At the language level, FP seperates data from behavior. However, in practice, even functional programmers still tend to couple data and behavior.

For instance, not much would change about programming in Haskell if List was defined as an abstract type, so users couldn't see its constructor or interact with it in any way except through its functions.

In OOP languages, this is unambiguous because the function/interface implementation is explicitly defined as part of the type. In FP languages, this is a little less clear because the implementation can be defined anywhere (although, should really be either near the data declaration, or the typeclass declaration).

Re:Exotic List Monads by Guthur on Friday January 08, 2021 @06:04AM (#25683481)
Only really true for the common (bad?) OOP languages, CLOS system in Common Lisp decouples the two and adds multiple dispatch for added spice.