never changes his practices however, he's so set in stone in the way he codes
From what I can tell this is true of the majority of coders in such environments. I honestly don't even know how these practices continue to be spread. I started OO 15 years ago and even then it wasn't new, though it was fairly exclusive. It's not the OO itself that makes it so strong and efficient, but it's the structure and ordered thinking it causes.
(Structured coding <-> structured thinking) -> structured design -> structured performance. And the key aspects here are efficient, repeatable, maintainable, and extensible.
You know what I'd love to see? The equivalent of the W3C's well-formedness labels applied to code. Run Blizzard's UI code through it:
The W3C Validator has determined this code to be - WTF?
(or perhaps even BUTWHY?) :)
The scariest thing with Blizzard's UI is that it uses XML, which enforces a structured, OO-type of mindset. Yet the Lua was handled in a procedural fashion which makes it totally incohesive with the structured XML. This is causes a virtual spider's web mapping of XML components to their scripts.
I wish I'd thought of running their XML through the W3C validator, that would've been funny. I adore their standards though and I try to adhere to them whenever mortally possible.
Also; slopping? *Peer.*
I agree with your statement wholeheartedly however, it just gives a good base to work from. It's like having a billion research sheets scattered over the floor of someone's home compared to working in a library where all the books, curriculae, thesis and papers are all shelved and correctly ordered in whichever categorization best suits them. I usually end up with the former but whenever I can get the latter, I dive for it. I find the latter much, much easier to work with and it allows the potential of things to be tapped.
Yep, and that was widespread attitude in the business world as well. Until they actually learned it and used it and found that the benefits outweighed the cons.
There certainly are performance issues when you hit certain high-end areas. But even if you have to break some of the rules of OO for performance, you can still borrow OO's structured design. The problem is that most game designers don't even try OO. The books started publishing years ago that it was bad and now few in the game industry even want to question that.
But I think we can unquestionably prove that OO is a leaps and bounds improvement over the current UI design, including better performance. Look at the kludgework that has to be done to pass variables to functions that don't know what job they're supposed to perform on what aspect of the system without being "told" every single call. In OO, this instruction is done mostly up front. It perhaps takes up more memory at the start, but consumes far less memory dynamically. I'm not even certain it takes up more memory at the start, though, since Lua's table-handling and metatabling seems very efficient.
Edit: "Also; slopping? *Peer.*" hehe. Fast typing, I guess. :)
It is really because I've seen a couple of open-source graphics engines coded in OO, that was before I knew what it was but I recognize it now. This tells me one thing about big business. They don't have a damned clue about who to hire. The amusing part is that the best computer people are self-taught, the worst are likely taught by educational institutions and get by on good grades and whatnot.
Likewise, Turan and I spoke of this idea via mail and he said on many occasions how he'd like to create an AcePack to replace the entire GUI but my fashions are actually far more grandiose.
What I want to do is hook the entirety of the UI, every damned function in the FrameXML and discard them, passing them along to Ace AddOns with better functions for those purposes. I dare anyone to take a look at the pet moodstate icon for example. Have you noticed that it occurs on an onUpdate?! It actually sets the moodstate every frame redraw. It calls SetTexture every bloody frame redraw! Now if that's not bad then I don't know what is. Surely there must be a better way. Via events, a timer ... something. Anything. ;p That's the worst implementation I've ever seen and that's their official code.
Frankly I just want to decompress the latest FrameXML at some point and start rewriting it, so that I could one day scrap it and replace it entirely. I would do this for the good of the community and to humiliate Blizzard into hiring some folks that actually know how to code.
That would be awesome to rewrite the entire UI. And I would like to blow away the default one while we're at it. I mean write a big module that would nil out every single default UI element in the game so that nothing but ours would exist.