20 ms·
> Anyone is perfectly capable of implementing a Maybe/Option/whatever type in C C doesn't even have parametric polymorphism, I'm not sure how you're imagining
by kmicklas 9y ago
> Anyone is perfectly capable of implementing a Maybe/Option/whatever type in C
C doesn't even have parametric polymorphism, I'm not sure how you're imagining this can be done.
- dragonwriter 9y agoParametric polymorphism is needed to implement “Maybe” as a generic type that can be applied to another type, but you can implement individual concrete Maybe X types without it. You could possibly use macro programming to do it “generically” at a level outside the type system.