4 ms·
I have not yet read "Elements of Programming," but there is another book "From Mathematics to Generic Programming," also co-authored by Alexander Stepanov, whic
by RossBencina 10y ago
I have not yet read "Elements of Programming," but there is another book "From Mathematics to Generic Programming," also co-authored by Alexander Stepanov, which links Abstract Algebra to program design. I found the latter very approachable:
https://smile.amazon.com/Mathematics-Generic-Programming-Alexander-Stepanov/dp/0321942043 https://smile.amazon.com/Mathematics-Generic-Programming-Ale...
- stillworks 10y agoI always had a strong belief that principles of Group Theory must correlate into writing type systems. Just looked at the ToC of this book and there is an entire chapter on Groups in that book ! Not only Groups but also goes into Rings as well... Must read this book.
- RossBencina 10y agoIn a Group, every element has an inverse element. If you drop this property, you get a Monoid.[0] Functions under function composition form a Monoid (or Monoidal Category). Brian Beckman did a nice intro video to this at MS Channel 9 a few years back.[1] [0] https://en.wikipedia.org/wiki/Monoid https://en.wikipedia.org/wiki/Monoid [1] "Brian Beckman: Don't fear the Monad" https://www.youtube.com/watch?v=ZhuHCtR3xq8 https://www.youtube.com/watch?v=ZhuHCtR3xq8
- tel 10y agoGroupoids, a generalization of groups, factor heavily into type theory!
- empath75 10y agoI think what you want is Category Theory.
- charlieflowers 10y agoQuestion -- clearly, when you look at Haskell, you see abstract algebra. Were Stepanov's ideas big influencers of Haskell, or vice versa, or neither?
- RossBencina 10y agoStepanov and Musser were working on generic programming in the 80s[0][1], which predates Haskell. I suspect parametric polymorphism was common in the FP world by that time, but I don't know whether it was used as an organising principle to the extent that Stepanov promotes. [0] https://en.wikipedia.org/wiki/Alexander_Stepanov https://en.wikipedia.org/wiki/Alexander_Stepanov [1] https://en.wikipedia.org/wiki/David_Musser https://en.wikipedia.org/wiki/David_Musser