[fpc-pascal] Re: [Bulk] Re: Namespaces Support

Benito van der Zander benito at benibela.de
Sun Nov 3 16:27:19 CET 2013


>
> Then the John Douglas and Douglas McKey are running into the same issue.
> Both guys (while living on different parts of the world) created the 
> same "douglas" namespace!

That's why most languages use domains as namespace
Then you would have

net.delfire.douglas.*
org.msegui.*

and no collision

On 10/29/2013 02:48 AM, Dmitry Boyarintsev wrote:
> On Mon, Oct 28, 2013 at 9:27 AM, Graeme Geldenhuys 
> <graeme at geldenhuys.co.uk <mailto:graeme at geldenhuys.co.uk>> wrote:
>
>     I would have thought that is exactly what namespaces will be handy
>     for! Or at least a popular use-case. Macros Douglas could define a
>     "douglas" namespace, and the MSEide+MSEgui project could define a
>     "msegui" namespace. Units, Classes or even lines of code should be
>     able to say which namespace they are referring too.
>
>
> Then the John Douglas and Douglas McKey are running into the same issue.
> Both guys (while living on different parts of the world) created the 
> same "douglas" namespace!
>
> Similar to using the same "M" prefix for classes unit.
>
> What option do these three guys would have now? Elevate another the 
> level of name space?
> john.douglas
> macros.douglas
> mckey.douglas
> douglas.mckey?
>
> Is it much different than just extending the prefix "M" to "MFP"?
>
> thanks,
> Dmitry
>
> P.S. Offtopic: I personally find it horrible to call a unit "classes" 
> (it's fine for RTL, since it's started this way, but any other library 
> - it is horrible). Nobody calls their units like "functions" or 
> "functionsandprodures" (though I think I saw unit "funcs" one day), It 
> is better to give more accurate name of the unit functionality: 
> StrLists, UnicodeUtils, FileUtls, DateUtils.
>
>
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20131103/66762b44/attachment.html>


More information about the fpc-pascal mailing list