[NTLUG:Discuss] For Language Junkies
steve
sjbaker1 at airmail.net
Sun Dec 25 16:55:14 CST 2005
Leroy Tennison wrote:
> Thank you, I now know that I'm confused at a higher level. I know that
> C++ and java are object-oriented, what about Python and Ruby?
You have to be a little bit careful here.
C++ has object oriented features - but it's a superset of C (which is
utterly devoid of OOP features). So it's perfectly possible to program
in a non-object-oriented style in C++. One of the more powerful
things about C++ is your ability to mix programming paradigms as needed.
Java is significantly harder to use in a non-OOP manner because of it's
lack of pointers and other features that you pretty much need to write
in a non-object oriented style.
Python and Ruby are also OOP languages.
> I haven't
> been impressed with Object Orientation. I realize it's supposed to be
> the "right" way to program (my, my - arent't we humble, the one right
> way to program...).
Well, OOP has a really strong advantage in some situations - writing
graphics code (as I do) is vastly easier with OOP methods.
There are times where a non-OOP approach works better - but as you get
more familiar with writing good OOP code, the number of occasions where
it fails you and you want to write 'conventional' code gets smaller and
smaller.
I share your skepticism over very small programs of the sort that
scripting languages were originally intended for - but for large
programs, OOP is a strongly recommended approach. I believe that
the increasing popularity of OOP in 'scripting' languages merely
reflects the fact that larger programs can now be attempted in those
systems.
More information about the Discuss
mailing list