4 ms·
Are you saying "monad" is a synonym of "interface"?
by AndyKelley 10mo ago
Are you saying "monad" is a synonym of "interface"?
- tome 10mo agoNot a synonym, but `Monad` is one of the commonly used interfaces in Haskell (not the only one).
- AndyKelley 10mo agoOK I think I understand now, thank you. My takeaways: 1. Yes, Zig is doing basically the same thing as Haskell 2. No, it's not a monad in Zig because it's an imperative language.
- themk 10mo agoIt still is a monad. It's just Zig doesn't have language support for monads, so it's less ergonomic. Just as modular addition over ints in Zig forms a group, even if Zig has no notion of groups. It's just a property of the construct. Laziness has nothing to do with it. What that means practically for Zig, I'm unsure.