I would like to put in a request for having Public, Private and Protected Methods and Fields in types.
When designing classes, these modifiers help a tremendous amount.
I'm not sure why you don't like Protected, but I think it's key to good Class design. Right now, All methods are visible to any derived class and to anything working with an instance of the class.
There are certain things that I need to keep hidden from both of those. There are also things that I want to implement in the class, and possibly override in a derived class, but should not be accessible outside the class/derived class.
Public is more of the "Outside World" interface to the class.
Protected is for things that you are implementing in a class, but you can see that it might be a good idea to override it in a derived class.
Private is for things that only really apply to the class they are implemented in. They will never be overriden.
This would be extremely useful for creating a Class Library that others could use. If you have 20 methods, how do you know which ones you should really use and which ones are meant for the class itself to use?
Here is an example of how I might use it (very simple example, might not be as real-world as it could be, but it should still show my point)
Now I'm not saying I can't work around it, however, it's just different enough from the majority of OOP implementations that it will drive me a little crazy :-)
When designing classes, these modifiers help a tremendous amount.
I'm not sure why you don't like Protected, but I think it's key to good Class design. Right now, All methods are visible to any derived class and to anything working with an instance of the class.
There are certain things that I need to keep hidden from both of those. There are also things that I want to implement in the class, and possibly override in a derived class, but should not be accessible outside the class/derived class.
Public is more of the "Outside World" interface to the class.
Protected is for things that you are implementing in a class, but you can see that it might be a good idea to override it in a derived class.
Private is for things that only really apply to the class they are implemented in. They will never be overriden.
This would be extremely useful for creating a Class Library that others could use. If you have 20 methods, how do you know which ones you should really use and which ones are meant for the class itself to use?
Here is an example of how I might use it (very simple example, might not be as real-world as it could be, but it should still show my point)
Type TMyBaseClass Protected Method UpdateAnimation() ' We do something here... End Method Public Method Draw() UpdateAnimation() End Method End Type Type TMyDreivedClass Extends TMyBaseClass Protected Overrides Method UpdateAnimation() ' Now we do something different here... End Method End Type ' The only method we can call is Draw() x = New TMyDerivedClass x.Draw() ' This is Ok... x.UpdateAnimation() ' Would not work as it would be proteced.
Now I'm not saying I can't work around it, however, it's just different enough from the majority of OOP implementations that it will drive me a little crazy :-)