Not sure if and when class support will be implemented as I have no idea what the current development state of the compiler is. But I was just thinking about it. Currently the keyword TYPE pretty much covers object oriented programming with inheritance, which is already close to full class support.
It is just my opinion that it would be great to leave the TYPE declaration and simply add the keyword class, similar to Pascal:
Code: Select all
Type TMyOpinion Extends Class(object)
...
End Type
And when subclassing:
Code: Select all
Type TMyOpinion Extends Class(TNoOpinion)
...
End Type
One could also do away with the keyword Extends and simply asign:
Code: Select all
Type TMyOpinion = Class(TNoOpinion)
...
End Type
Another option would be to replace the keyword TYPE by CLASS and downgrade TYPE back to simple structures, or put Class next to it, but at the risk of some confusion. Admittedly this would be more "BASIC" like:
Code: Select all
Class TAnotherOpinion extends object
...
End Class
whereby "extends Object" would probably be redundant when not subclassing. Not sure what the compiler engineers have in mind, but this is just an idea, and frankly, I hope we will see full class support coming soon!
Anybody having an opinion on this?