Am 31.01.2016 um 04:55 schrieb Benoît Minisini: > You can already do that, except that vendor name should be included in > the library name.
Ok. I can throw them all in one directory. But the library name unfortunately does not act like a namespace, it does not separate the Classnames. If you have two libraries which contain classes with identical names, then BANG. > I'm against using namespaces in Gambas, because I think it's mainly a > workaround of the inhability to find good class names. :-) I disagree. :-) That is right with a handful applications/libs in mind (aka "inhouse"). Not everybody has the whole world in mind when programming it's good idea. There are always common tasks inside a library for whom it is difficult to find unique (and understandable) names, like "Template", "Cache" and so on. So I usually name these classes "DegTemplate", "DegCache" and so on. But that is also a workaround and even dangerous when giving the library free to others. To give away your good idea as library you actually would have to: 1: Take a vendor name in the libs name. 2: Name every class inside the lib with a vendor prefix and hope, that it is not used elsewhere. What stands against the ability to do: /usr/lib/gambas3/lib/vendor1/this.gambas and /usr/lib/gambas3/lib/vendor2/this.gambas /usr/lib/gambas3/lib/vendor2/that.gambas ? You could separate them inside code like so: Dim CacheV1 as vendor1.this.Cache Dim CacheV2 as vendor2.this.Cache Here there is no danger anymore. Everybody can freely exchange libs with others. In PHP the usage, quality and exchange of libraries literally exploded with namespaces: https://packagist.org/statistics Ok. I do not know how difficult it is to realize such a thing in the interpreter. And I like Gambas very much. Even without namespaces. Alles Gute Christof Thalhofer -- Dies ist keine Signatur
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
