Replies: 2 comments
-
I don't disagree, but it's not as onerous as indicated.
If you export an interface or a base class, rather than the class itself, you can have public methods that are accessible only in the script. This might even be a feature. |
Beta Was this translation helpful? Give feedback.
-
That is a bit overwrought. Some of it survived an earlier edit suggesting an accessibility modifier (possibly feature level) when I'd simply forgotten that Subclassing for internal use seems like begging the bar-tender to return the keys to your car when you don't even drink.
That's what they all say. |
Beta Was this translation helpful? Give feedback.
-
Modules, seen as a co-operating collection of data, functions and objects, are currently difficult to build when classes are used both internally in the declaring script and exported for external use.
It appears there's no way to access private class features at script-level without having the class provide public wrappers. This forces unwanted changes in any exported class interface simply to accommodate internal script-level use.
Access to private features is already extended to all subclasses and I can't see any reason not to expand this to the declaring script.
Beta Was this translation helpful? Give feedback.
All reactions