He fails just like almost every other OOP explanation out there. The proper way is to, once your audience knows C, explain how OOP can make programming more simple and efficient by replacing structs and pointers to functions with objects containing methods and data. That is better than pointless hand-waving about how OOP can model real-world objects.
tl;dr:
- you have one or more structures containing data
- you have one or more functions that, taking a pointer to said structures, does something with the data
- the structure definitions are the classes
- allocated structures are objects
- the functions are methods of the class
...and that is OOP.
Name:
Anonymous2008-03-19 13:31
Why the fuck do you need to explain it? -- OOP is useless!
Name:
Anonymous2008-03-19 13:32
I don't understand why people say that you can\'t do OOP with C
>>9
Actually, that's the transition from procedural to OOP.
Name:
Anonymous2008-03-19 14:31
terrible, yes.
also anyone who doesn't intuitively understand the encapsulation of state and function in creating an Abstract Data Type should stop using computers immediately.
also (examples given in Objective-C)
what
Name:
Anonymous2008-03-19 14:37
>>8
You can't, because if you're using C you should know better.
Name:
Anonymous2008-03-20 15:11
>>8
They say that because they're too weak to bother with all the manual hacks you need to keep up-to-date all around your code in order to do proper inheritance and polymorphism in C.
Name:
Anonymous2008-03-20 15:16
>>9
Actually, that's non-pure OO languages like Sepples.
Name:
Anonymous2008-03-21 0:40
Oh, fuck all of that enterprise faggotry. I'm so goddamnEXPERT I don't even document half the code I write, and its ALL in C. Fuck enterprise, fuck OOP, fuck even the ABSTRACT BULLSHITE, I'm an [sup][u]EXPERT[/sup]C programmer and I'm damn proud of it.
Name:
Anonymous2008-03-21 0:46
This tutorial is so sad. I could explain OOP better in fewer words with half my brain tied behind my back.
Name:
Anonymous2008-03-21 0:50
HASKELL. HASKELL NOMADS.
Name:
Anonymous2008-03-21 1:00
>>6
No you dope, OOP is two things: a way to make "I don't care" a good answer to the question "How does this work?", and a method to enable more extreme late binding in your programs. By describing OOP from the bottom up, you've managed to completely miss the point, and mislead who knows how many noobs.
tl;dr
- In OOP you construct programs by asking objects to perform tasks for you, and you don't need to worry about how it happens.
- Objects are so modular that they can be substituted for one another at any time, letting you more easily write programs whose behavior is decided at run-time when your program has the information it needs to decide that behavior.
>>21
This may surprise you, but Cake is a shitty band.
Name:
Anonymous2008-03-21 5:44
>>18
- In Lambda Calculus you construct programs by asking functions to perform tasks for you, and you don't need to worry about how it happens.
- Functions are so modular that they can be substituted for one another at any time, letting you more easily write programs whose behavior is decided at run-time when your program has the information it needs to decide that behavior.
>>22
This might surprise you, but why should I care about your opinion?
Name:
Anonymous2008-03-21 11:57
>>23 - In Lambda Calculus you construct programs by asking functions to perform tasks for you, and you don't need to worry about how it happens.
Same as in QBasic programming.
Name:
Anonymous2008-03-21 12:38
>>25
But then again, QBasic is pretty awesome.
In fact, I can think of only one thing that would be more awesome.
Gentlemen! I present to you... λBasic.NET