Quote: "That is, frankly, complete and utter rubbish."
I am not talking from one side of the fence, I code in everything from
IBM RPG (predates Basic by 20 years) to Java. I can say from experience that you can shoot yourself in the foot with any language, but when you do it in OOP, it has a tendency to ricochet to the brain.
Quote: " it responds to events, which are essentially interrupts"
...and every interrupt must be polled for its state, an overhead. It is acknowledged that interrupts degrade quickly with quantity, to the point of stalling (you can't fit any work in because there is too much to poll), unless you add additional handling,another overhead.
Quote: "OOP is about structure and clarity, and nothing to do with polling"
...for the programmer, which is my point. For the system, it's an overhead.
Quote: "With basic, I have to manually check to see if any control I have placed on the display is clicked on every sync cycle if I want to catch it. So, I'm doing all those checks deliberately"
I agree entirely. So when a entity doesn't need checking, you ignore it, you have control over what you do and don't check. In essence you switch your polling of that entity off.
Quote: "Apart from the tedium of writing lots of repetitive code, if you discover that a particular line of code is wrong you have to go and modify it everywhere. We've all done this. You always miss one. If it's nicely concentrated in a little bit of functionality, one fix fixes everything. Maybe!"
I agree, but it's true of all languages. I have to maintain some Java code written by a development team that repeats the same code, and same mistakes across multiple classes,and multiple times within each class. It's down to the programmer again.
Quote: "Constructors and destructors could be emulated using UDT's and a simple function in basic. I know they wouldn't have quite the same range of uses but it's a pretty basic concept, and again unnecessary in a simple program.
you have an adventure game with 500 rooms, four hundred NPCs and a loads of levels. Yo want your code-base to be as simple as possible. You want your NPCs to know how to move, fight, hide, die. Making classes with inheritance makes this much, much easier to control.
"
Inheritance is easier, agreed. But I have to add that
this and
this isn't that difficult.
I think my comment on Spaghetti code has overwhelmed the point of my post, and my use of a button to illustrate interrupts/polling taken out of context (a button is a class, and it's easy to visualise). My post was simply to refute:
Quote: "Basic is a badly-designed language for anything that's not a toy or a quick prototype"
All languages have their good and bad points, I use the full range, and sometimes I have the luxury of selecting which one I want for a particular task. I'm using .NET and it's OOP elements for an issue-monitoring tool right now which I built from scratch...speed was of the essence.
If you sit a Tier 1 and a Tier 2 programmer side by side, they'll win/lose the programming battle based on the task at hand. And don't forget, the FPSC engine is DarkBASIC Pro, and Evechron Mercenaries is DB Classic!
Quote: "Maybe we should have a language discussion topic - just for fun!"
I like that idea!
In summary, I'm not disagreeing with the good things about OOP, just don't dismiss highly efficient procedural languages, which are still running most of our world due to their stability and robustness
Finally a real quirky one for you. IBM's RPG ILE IV is a procedural language, yet it includes Dynamic Binding which is a core element of OOP. But C++ doesn't have Dynamic binding. The reason why? Because early adopters of C++ decided that it was too far removed from the procedural model they understood!