3 ms·
I'm very confused by the idea that OOP would be considered somehow more "algebraic". Functional programming seems way more algebraic to me. I mean, writing Hask
by Sniffnoy 14y ago
I'm very confused by the idea that OOP would be considered somehow more "algebraic". Functional programming seems way more algebraic to me. I mean, writing Haskell seems about as algebraic as programming gets even without using monads or other such very-high-level abstractions. Also, odd where he puts emacs/vi compared to where he puts programming languages, considering that emacs uses Lisp. (FWIW, I prefer algebra, and I tend to eat corn in patches.)
- deleted 14y ago[deleted]
- profquail 14y agoThere's a neat connection between comonads and OOP. Comonads are used to describe context-dependent computations. In OOP, you might define a class along with some instance methods (which access private fields or somesuch in order to manipulate the state of the program). The connection between comonads and OOP arises when you think of a comonad where the "context" is an instance of your class -- so your class methods are the context-dependent computations.
- pacala 14y agoOOP is more algebraic compared to procedural coding. In fact, OOP is morphing into functional programming as "design patterns" become widely adopted.
- noblethrasher 14y agoAlgebra is the study of sets and their operations. In OOP you spend a lot of time defining sets (classes) and coming up with operations on those sets (methods). In FP you're not so concerned about coming up with sets and operations but rather breaking things up into ever smaller pieces. I mentioned elsewhere that analysis is about starting with big circles and making them arbitrarily small. This is pretty much what recursion is.