[Gambas-user] Library and File
Tobias Boege
taboege at gmail.com
Thu Nov 15 01:02:01 CET 2018
On Thu, 15 Nov 2018, Benoît Minisini wrote:
> Can you elaborate with a precise example?
>
> Each library already has its own namespace.
>
> Only the exported classes share the same namespace, and if two libraries
> export the same class, then that usually means they want to do the same
> thing and cannot be used simultaneously.
>
For me, the main point, I think, is to be able to make classes available
without exporting them, and then being able to address and use them
unambiguously. In the topic of this thread, one could provide a Help.class
(rather, Help.module if you think about it) in all libraries that care
to expose their help file to the main program. Since "Help" might be a
common symbol name to export, the developer might choose not to export
to avoid overwriting someone else's Help or becoming a Help that is being
overwritten by someone else.
In that case, the class should still be available from some prefix:
MyLib1::Help.Get() ' the Help.module from MyLib1.gambas
(Or any other kind of prefix, like vendor names as Christof suggested.)
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
More information about the User
mailing list