Quote Originally Posted by Niya View Post
BTW, I also did this same project in VB6 before and while I managed to make it work, it was no where near as clean or elegant, no matter how much I tried to make it so and I remember quite well trying a number of different patterns in the hopeless attempt to make the project manageable. I never found a clean way to model it in VB6 and it quickly became a huge mess and seeing how cleanly others implemented similar ideas in C++ using inheritance and function pointers, etc(I was looking at the Doom source at the time) only frustrated me even more that I couldn't do it like that. I finally gave up and stopped working on it. At the time I concluded that VB6 was never the language for this kind of thing. I was thinking that I should have used C++ instead. Of course that was long before I knew anything about what VB.Net or C# had to offer.
This reminds of a fun (brief!) diversion.

Doom was actually written in C. So were Quake, Quake II, and Quake III Arena. iD didn't move to C++ until Doom 3, and even then, Carmack had concerns about his ability to use it well. This analysis of Doom 3's source code is one of my favorites - and I think relevant to this discussion - and if you scroll down you can see Carmack's response in the comments. Here's the bulk of it:

In some ways, I still think the Quake 3 code is cleaner, as a final evolution of my C style, rather than the first iteration of my C++ style, but it may be more of a factor of the smaller total line count, or the fact that I haven’t really looked at it in a decade. I do think “good C++” is better than “good C” from a readability standpoint, all other things being equal.

I sort of meandered into C++ with Doom 3 – I was an experienced C programmer with OOP background from NeXT’s Objective-C, so I just started writing C++ without any proper study of usage and idiom. In retrospect, I very much wish I had read Effective C++ and some other material. A couple of the other programmers had prior C++ experience, but they mostly followed the stylistic choices I set.

I mistrusted templates for many years, and still use them with restraint, but I eventually decided I liked strong typing more than I disliked weird code in headers. The debate on STL is still ongoing here at Id, and gets a little spirited. Back when Doom 3 was started, using STL was almost certainly not a good call, but reasonable arguments can be made for it today, even in games.

I am a full const nazi nowadays, and I chide any programmer that doesn’t const every variable and parameter that can be.

The major evolution that is still going on for me is towards a more functional programming style, which involves unlearning a lot of old habits, and backing away from some OOP directions.
I like that opening quote a lot, "I still think the Quake 3 code is cleaner, as a final evolution of my C style, rather than the first iteration of my C++ style." A language you know and wield well is always going to result in clearer code than a language you don't know as well.

It also makes me feel better that the greatest coder of all-time (yep, I went there) is also working at un-learning old OOP habits in favor of functional programming, where appropriate.

Quote Originally Posted by Schmidt
Well, not sure why my responses always seem to be recognized as "coming-out-of-the-wrath-corner" - I'm just passionate in defending my position - with good arguments I think - and with reasonable
and logic requests - or simple questions, when points of disagreement were reached.
Like JackB before (whose sarcasm was quite funny, I thought), I think you need to read our comments with a little less literalism. I was just teasing you; I enjoy the passion on display. (However, I'm less fond of your use of hard line breaks, which cause your posts to flow very poorly on certain screen resolutions! )