[Gambas-user] Idea for 3.17

Bruce adamnt42 at gmail.com
Wed May 5 20:20:53 CEST 2021


On 6/5/21 3:45 am, Christof Thalhofer wrote:
> Am 05.05.21 um 18:19 schrieb Bruce:
> 
>> As for java style naming, YUCK!
> 
> Namespaces are there to make my work available to other programmers as
> libraries without breaking their software. If I publish my work in the
> Gambas Software Farm people can only copy and paste it for their usage.
> This is poor man's software sharing.
> 
> But if we introduce namespaces we have to do it in a way that we won't
> destroy software on updates and which does not make the system
> vulnerable because of using the wrong names:
> 
> Let's assume I write a class called 'Mail' and publish it so that others
> can use it in their software. Let's also assume it becomes famous and a
> lot of people use 'Mail'.
> 
> When I published it under the namespace 'Cocacola:Mail' then 'The
> Coca-Cola Company' can later forbid the usage. So I will better publish
> it under the name 'deganius.de' which is mine.
> 
> What if I change 'Deganius.de:Mail' in an incompatible way and publish
> the changes? Will that break other software when the changes are
> accidentally introduced by an update?
> 
> Some years ago I talked with an expert about namespaces in computer
> languages and how to design it. He gave me these advices:
> 
> -----------------------------------------------------------
> 
> You have to set it up so that you can always find out what was included
> and for what reasons.
> 
> Basics:
> 
> 1. Align namespaces with domain names. Nowadays this is the easiest way
> to avoid name conflicts in the first place. Alternatively, you can build
> your own registry, but that is legally mined terrain because of
> trademark law and sovereign fixed names (what should the registry do if
> someone wants to have the namespace "UTF-8"?).
> 
> 2. Possibility to declare module dependencies. There one can orient
> oneself at the Dependencies of existing systems, e.g. the package
> administrations of the Linux Distros (yum, pkg, dpkg etc.) and Maven.
> 
> 3. Defaultpolicy: Once a module is published, it may never be changed
> again. No bug fixes either - the old version is still needed for any
> future bug diagnostics. If a new version needs to go out, the publisher
> makes a new version number that becomes part of the module name.
> 
> Since the namespace is something global, there is a lot more to it than
> just a bit of syntax.
> 
> -----------------------------------------------------------
> 
> Personally I'm fine with Gambas as it is. But I have a few libraries
> that might make the life of a database programmer a little easier that
> I'd like to share. Doing this in a reliable way is currently impossible
> with Gambas. That's why I find namespaces necessary.
> 
> Alles Gute
> 
> Christof Thalhofer
> 
> 
> 
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> 

Doesn't the vendor prefixing for libraries already provide that?
bruce


More information about the User mailing list