Lan Barnes wrote:
On Sat, June 9, 2007 11:31 pm, Stewart Stremler wrote:
begin quoting Lan Barnes as of Sat, Jun 09, 2007 at 10:51:00PM -0700:
[snip]
I don't think I misunderstand C++. I certainly don't grok OOP (probably
because C++ is the only language I've formally studied that claims to be
OOP).
Don't bash OOP based on C++. C++ is the poster-child for how not to do
OOP. If you like modular/structured programming, OOP can be seen as
the next step in that direction. (If you don't, then you should probably
run away.)
I don't think that undercuts my attack on C++.
I don't think it was intended to. The intent appears to be to suggest
that you try grokking OOP using a different language which does a better
job of showing up the advantages of OOP.
Actually, Tk in Tcl is already quite OO. And I do understand the thrust of
OOP (I think). My reaction was "but that's what we were always _trying_ to
do already." Better tools to do a good thing are a Good Thing.
Yes, if you are a good programmer, you were undoubtedly doing most of
the stuff involved in OOP, and OOP languages are just about making that
easier (and that in turn magnifies the benefit and is generally a Good
Thing, as you state).
That said, I rebel against the unspoken premise that ALL programs call for
OOP and ALL OOP should be done in C++ (or even C#, which I know zero
about, it being over my M$ event horizon).
Whomever said that ALL OOP should be done in C++ is a moron, a language
bigot, or both (is that redundant? ;-). That makes about as much sense
as saying all programming should be done in language X....
Wait, it probably makes less sense for most reasonable values of X. ;-)
Saying that ALL programs call for OOP sounds pretty insane too, but it
is possible the root of the intent of the statement is rational. It is
hard to imagine many cases where some attempts at encapsulation wouldn't
benefit a program (and if someone says performance, I'll suggest instead
that someone should log a bug against a compiler or runtime).
I personally believe that the devotion to C++ and nothing else shown at my
shop comes primarily from two fallacious beliefs. (1) developer machismo
-- if it ain't compiled, it's by and for wimps; (2) PHB ignorance -- if
it's compiled, no one can ever steal our code.
If the axiom is, "it must be compiled", there are a LOT of other choices
besides C++ (in particular, you'd think C would come to mind ;-). I hope
to they have some other (also likely poorly considered) rationale.
Someone (Chris?) mentioned Python in this context. I say RIGHT ON!
I know it is tough for a Python fan to consider doing this, but IIRC the
book "Advanced Perl Programming" does a great job at talking about the
advantages of projects that use both a systems and a scripting language.
--Chris
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg