Ah, well, I won't try to defend C++. It's broken. There are some good idea in OO, but C++ is a broken implementation. I agree with most, possibly all, of your comments.
We've talked about this before, so I'll simply repeat my position: good design is language (and language feature)-independent. A somewhat restricted toolkit (aka "discipline") actually helps comprehension. And comprehensibility is, or should be, the aim.
Heh. I happen to admire the chap hugely.
FWIW: my particular game is small-to-large volume embedded products which
*must* be bugfree, *must* be maintainable, and *must* be on time. I've studied all sorts of methodologies, and all sorts of languages, in my quest for robust and timely software. I've developed a set of tools and methodologies which work for me, and which - rarely - I see echoed in the more clueful companies I've worked with, which is nice. This quest - to formalise the process that results in high-quality code - is a bit of a passion of mine (as you may have noticed from previous postings ;)).Some of my key mantras include:
- break a complex system down into a hierarchy of trivially simple things - define the interfaces between them carefully - avoid all interactions (use those interfaces, and don't work around them) - no globals (see above re interfaces) - try to keep things synchronous, or deal with asynchronous events synchronously - factorise: i.e. state things as simply as possible, and avoid duplicate code - debug for typos, not for failure to plan
There's more, but that's the essence of it. As I've said, the use of a GOTO per se is no big deal - it's the bigger picture that matters. I haven't used a GOTO to break a closed structure in 25 years or so now. There are *always* cleaner solutions, which render the problem more malleable and more maintainable. If you saw my C code, you'd be able to read it. It's kinda close to structured English. And yes, you *would* know how you arrived at any point in the program.
With apologies to the c.a.e. folks who've heard me pound this soapbox before... (which is why I've been avoiding this thread ;)).
Steve