Re: vector programming...

From: Andrew Wilson <atwilson_at_home.com>
Date: Mon Oct 04 1999 - 15:13:13 EDT

>Object oriented programming is a programming methodology - not a language.

        That's a helluva good point, and there's no doubt that MAME uses
OO methodology. That's one of the reasons it's been able to survive as long
as it has, with so many different programmers - a solid underlying
modularity.

        My point was that a different language (C++ in particular) might make
it easier (and less error prone) to do many of the things that MAME does
manually (tables of functions, structures with manual initialization
routines/huge explicit initializers, etc). If you don't believe me, then I
dare you to add a field to the GameDriver structure - you'd have to manually
update hundreds of files with explicit structure initialization.

>The fact of the matter is 99.9% of people don't know when (or more
>importantly when not to) classify things in C++. They do it because it's
>"neat" or "trendy" - not because they're consciously making a decision
>to use a class wrapper, etc..
>
>Sorry, but I've seen SOOOOO much C++ abuse in my professional career. I'm
>not down on C++ - it has its place.

        Yep, gotta agree there. My last job was porting a huge hunk of legacy
code to the PSX (The X-Files Game). I saw it all (virtual functions in template
classes, mammoth do-it-all-in-one-class APIs - a 2000 line implementation of
a *Rectangle* class!, overloaded copy constructors with bad side effects) - to
be fair, I also saw some pretty good design. But giving some people a C++
compiler is like letting a baby play with a gun.

        That said, there's a certain beauty to a properly implemented OO
program. You can achieve it with any language (including C, which MAME does),
but with some languages you just don't have to work quite so hard at it.

                        Drew

        

        
Received on Mon Oct 4 14:13:15 1999

This archive was generated by hypermail 2.1.8 : Fri Aug 01 2003 - 00:32:44 EDT