[Gambas-user] Proposal for namespace support
Benoît Minisini
g4mba5 at gmail.com
Tue May 11 23:30:35 CEST 2021
Hi,
Here is the result of my thoughts about namespace support.
I tried to find the simpler and less disturbing solution for the
interpreter code.
1) A new syntax for exporting classes.
' Class MyClass
Export As NameSpace:PublicName
will export the class MyClass in the global table as "NameSpace:PublicName"
The MyClass name is still available inside the code of the current project.
Note that the old 'Export' keyword alone would be an equivalent of
'Export As MyClass'
2) A new syntax for class names.
Dim A As NameSpace:PublicName
will automatically get the class named 'NameSpace:PublicName class' in
the global table by the export made in 1)
Do you think that it fulfills the needs detailed in the previous thread
about namespaces?
--
Benoît Minisini
More information about the User
mailing list