[Gambas-user] New namespace support

Christof Thalhofer chrisml at deganius.de
Fri Feb 4 09:42:20 CET 2022


Hello Benoît,

Am 03.02.22 um 17:38 schrieb Benoît Minisini:

> So the namespace feature just allows to choose what the public name is,
> using a convention: everything before ':' is the namespace, and two
> different people or organization should use different namespaces, to
> avoid collisions.

Thank you very much for the Namespace feature. This is great news! :-)

I have two remarks.

1) Can we introduce sth like a project-wide namespace so that every 
EXPORT per default exports the classes as 'ProjectNamespace:PublicName'?

This would avoid typos if someone plans to export all classes of a 
project under one single namespace.

Or is this a bad idea?

2) Can we give the global namespace a special name so that for instance

'Dim Pn As New PublicName'

is a synonym to

'Dim Pn As New Global:PublicName'

so that the namespace 'Global' (or maybe 'Default') is reserved forever?

I don't have a specific application for it now, but rather a feeling 
that it could be quite practical at some point and it wouldn't be good 
if we hadn't introduced it right at the beginning.

---------------------------------------------------------

And I have a question about compatibility.

Would Gambas 3.16 execute code of 3.17 which contains namespaces?

Alles Gute

Christof Thalhofer

-- 
Dies ist keine Signatur
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220204/19d8dc82/attachment.sig>


More information about the User mailing list