3 ms·
OOP "for beginners" always seems to be taught as some godawful real world analogy. It's probably easier to talk about it if you've done a little imperative pro
by TillE 13y ago
OOP "for beginners" always seems to be taught as some godawful real world analogy.
It's probably easier to talk about it if you've done a little imperative programming and can grasp OOP as a solution to actual problems, rather than just some abstract nonsense.
- purringmeow 13y agoIt isn't. I took a course in my last year at high school and real world analogies made OOP seem a breeze. Almost no one in the course had problems grasping OOP basics and applying them. Of course, the OOP lectures came after 3 months of intensive studying and basic algo tasks solving.
- gavinpc 13y ago> some godawful real world analogy. Yes, I think this is a real distraction. This Cat/Dog/Animal trope leads to the view that you should use classes to model your domain objects. In some cases, you should. But this can cause as many problems as it solves, and should not (IMO) be the default approach. In getting away from this view, I've found it helpful to think of most programming as designing DSL's. To that end, you can use OO to build the infrastructure necessary to support this. But I worked in OO languages for many years before grokking that.