Implementing Interfaces in C - DEV Community
https://dev.to/totally_chase/implementing-functional-type-safe-polymorphism-in-c-10b9
BriefEnter Type ClassesGoals of The Typeclass PatternA Small TasteThe Typeclass PatternImplementing Typeclasses For Your Own Types!Combining Multiple TypeclassesReal World UsageWith this pattern, I've implemented the lazy functional Iterators in pure C. It's essentially modeled after Rust's Iteratortypeclass. But that's not all! A lazy Iterator isn't complete without cool abstractions like take, drop, map, filter etc. You can implement all of these abstractions using the same Typeclass pattern. It's very similar to how ru...See more on dev.to With this pattern, I've implemented the lazy functional Iterators in pure C. It's essentially modeled after Rust's Iteratortypeclass. But that's not all! A lazy Iterator isn't complete without cool abstractions like take, drop, map, filter etc. You can implement all of these abstractions using the same Typeclass pattern. It's very similar to how ru...
With this pattern, I've implemented the lazy functional Iterators in pure C. It's essentially modeled after Rust's Iteratortypeclass. But that's not all! A lazy Iterator isn't complete without cool abstractions like take, drop, map, filter etc. You can implement all of these abstractions using the same Typeclass pattern. It's very similar to how ru...
DA: 13 PA: 3 MOZ Rank: 75