3 ms·
> It's like trying to show how to do OOP in C. It's a different paradigm than the primary of the host language, so any educational aspect will be severly dilute
by eropple 11y ago
> It's like trying to show how to do OOP in C. It's a different paradigm than the primary of the host language, so any educational aspect will be severly diluted
Says who? I've taught OOP, as a concept, to people using C. It's incredibly obvious when you see it written--once you've implemented inheritance through structural composition, it's strikingly easy to reason about how traditionally OO languages handle their object models.
(This is basically what GTK does!)
- candu 11y ago+1. I'd argue teaching OOP in C is better than teaching it in <insert OOP language here>, as then you can build OOP from first principles. Otherwise, OOP is just this black box that has "you know, classes and objects and stuff". Similarly: you can build a simple LISP in Javascript. You can write an event loop in C. You can implement Hindley-Milner type inference in Python. These are all great exercises in understanding exactly what these components of different programming languages do :)