Although some libraries like Borland's makes it so that EVERYTHING is an object, this is overkill. It is extremely easy to go overboard. OO is not the end of procedural programming, but a great tool to augment or replace components of it.
Totally agree. Ruby is also completely made up of objects, though semantically it appears free-form scripting. I liked what vs said the other day about it. Something like "Ruby allows curly braces... I'm using them!" Personally I think that by forcing everything into classes/objects people learn how to program with the wrong mindset; if you need something quick and dirty, write a class then instance up an object and use its method(s). Unlike spontaneity, there's a very appropriate time and place for procedural code.
Here's two terms I live by in class design. By class design I'm
strictly referring to the Crayola IDE
--- Has a ---
--- Is a ----Some refer to "Has a" as "Uses" but the point is the same. So
IS this car born of metal? Although required, the car is not made of air, gas, oil, etc. Therefore it uses or "has a" gas, air, oil, etc.
From there executable functionality makes more sense. If the car "has a" stereo then it makes sense for the
stereo to expose tuning and volume functionality to the car. Moped|home|pogo-stick code doesn't change when accessing
myRadio.volumeAdjust(10);
However, when the new internal radio amps start shipping with the latest radio offering, the code still works but has
additional functionality:
myRadio.volumeAdjust(11);
myRadio.playSatellite('Shark Sandwich');
That's just what I do kurdt. Not sure if that's what you were asking for but let me know if not.
Oh yeah, relocated to San Jose bitches!! Best move I've ever had in my life. Nothing like having a girlfriend that gently reminds me to frag-off and start packing
before the day of the move
