[Gambas-user] protected for a variable inherited from a class

Jussi Lahtinen jussi.lahtinen at gmail.com
Sun Apr 23 20:18:04 CEST 2023

> Declaring a variable or method PUBLIC or PRIVATE determines only its scope
> and visibility within the project. Public symbols are
> accessible within the code of the entire project but are not accessible
> outside of the project, unless, in the case of a
> component, the EXPORT declaration is used. PUBLIC verses PRIVATE is not a
> security issue; it is a scope issue.

I guess the problem is exporting a class, which exposes functions that are
not meant to be exposed. This could create confusion and problems to the
users of the component.
Maybe Benoit will implement the "protected" keyword, otherwise I don't
think it can be done cleanly.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230423/b41bcc66/attachment.htm>

More information about the User mailing list