If people seriously want an OOP implementation of PureBasic, it can probably be done in the first instance as a pre-processor or translator of some sort. That being the case, defining the syntax is probably an important step.
So, what sort of syntax would suit? Our project (if there was one) would translate back to Pure, so it does not need to use Pure interface type syntax. Also the PreProcessor could do more than one pass. Etc Etc. In other words, bias towards Pure but don't be limited by the way it would be done if coding in Pure.
Obviously all PureBasic command/statement syntax remains intact. But for the OOPish stuff?
Eg:
Code: Select all
Class MyThing
property NameA.l
property NameB.l
Method procName.l(par1.l,par2.l)
EndClass
Class myOtherThing
inherit myThing
property NameC.l
EndClass
Function procName(par1.l,par2.l) ; To differentiate from proc
THIS.NameA + par2
procName = THIS.NameB + (par2 / par1)
EndFunction
Procedure helloThere(varA.l) ; Normal proc but uses wotsit
ProcedureReturn varA + wotsit.NameA
EndProcedure
Create myWotsit.myThing
myWotsit.NameB = 99
debug myWotsit.procName(11,12)
Edit: There is also this post: http://www.purebasic.fr/english/viewtopic.php?t=22081