For the majority of development, I think OO is pretty much overkill. When it comes to games dev though, it does make a little bit of sense - especialy the look and feel of ecapsulation ...
player->walk()
mmm, lovely.
Part of darkbasic's charm is its simplicity - so full on OO isn't going to score too many points. If I were to make a suggestion for the
"might be nice to have if you've nothing better to do" list then it would be able to support functions in type defs...
type TExample
num as integer
active as boolean
walk(param1 as integer, param2$ as string) as float `-- return type
scratchAss(ownAss as boolean) `-- no return type
endtype
global foo as TExample
foo.num = 346
foo.active = 0
foo.walk(10,"forward")
foo.scratchAss(1)
It wouldn't provide any more functionality - no more than having player_walk(), or walk(&player) .. or however you would pass by reference in DB. It just looks nice. So perhaps we can somehow come up with some syntactic sugar...
Can I ask you a Question?
What is it?
It's an interrogative form of sentence, used to test knowledge. But that's not important right now.