Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

OOp

Name: Anonymous 2010-08-26 13:18

So I'm trying to learn OOp. I learned about all the features (inheritance, polymorphism and so on). I have two simple questions:

When is it advisable to instantiate objects instead of just using static methods? I always seem to diverge to imperative programming using only very few OOp features.

Don't OOp programs need a lot more of memory and processing power?

Thanks!

Name: Anonymous 2010-08-27 8:28

>>17
Yeah, yeah, IHBT, but I'll bite.

Try
Best de-fecto example [of abstraction]

It's the most accessible abstraction mechanism to someone using C++ and it's very widely used in general, making it a good example. I can't think of a better usable example in Python, Java, etc., and Python's OOP model is quite broken.

You could easily come up with a better one in Lisp/Scheme because you can pass functions around as first-class types and I suppose you could probably find a decent one using C#, given that it supports closures, but I don't expect that someone new to OOP would find those as accessible or common.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List