AFAIK the only way to do this in the SCII system would be to use arrays, with properties as elements and named constants holding the indexes. (E.x. NAME = 0, and the 0th element of a Pokemon is its name.) We'd need to know ahead of time exactly how many properties we would need to have, since dynamic arrays are unsupported. We wouldn't be able to define some equivalent functionality to methods (because since it's C-style, we can't use the "everything is an object" paradigm, and so we can't store functions in arrays), so we'd have to pollute the global namespace with a ton of data-processing functions.
So a very advanced system with high-level abstractions and lack of code duplication is possible without objects, prototyping, or dynamic arrays. But AFAIK/IMO it's extremely difficult to code and almost impossible to reliably or easily maintain.
I do hope that I'm proven wrong. I hope that SCII's scripting is designed in a way that makes everything possible and indeed, programmatically beautiful, without OOP. But as an OOP-dependent (self-proclaimed) JS expert, I just don't see how that's possible.
(I'm absolutely certain that objects' are useful for more than just massive remake projects. However, I lack the non-programmatic creativity required to think of other projects that would depend on them.)
Post has been edited 1 time(s), last time on Mar 9 2010, 4:53 am by DavidJCobb.
None.