4 ms·
The important part of what I guess you could call algebraically structured combinators is that they must follow certain laws. A type system can certainly help e
by prutschman 13y ago
The important part of what I guess you could call algebraically structured combinators is that they must follow certain laws. A type system can certainly help enforce at least a subset of those laws, but you're right that you don't have to have one in order to make use of the structures.
Where you lose me is in saying both that a basic understanding of abstract algebra is helpful and that monoids are part of the "smoke and mirrors"; I'd consider monoids a part of a basic understanding of abstract algebra.
- dkarapetyan 13y agoPoor choice of words on my part. Yes, monoids are indeed a very basic kind of algebraic structure but the tutorials for these structures are always in a language like haskell where the actual simplicity of the concepts gets lost behind the type system. Type systems in my mind are logical structures and even though there is a very close relationship between algebra and logic one doesn't always have to tie the algebraic structures to some kind of type system to make sense of them.
- prutschman 13y agoNods. The nice part about the type system is that it can automatically reject (some) misuses of the structures. I've found that helpful while learning some of these things as it can let me know that I don't actually understand something that I thought I had. I agree that emphasizing the typed aspect can do an injustice to the other algebraic properties.