[fpc-devel] Namespaces like URLs

Marcos Douglas md at delfire.net
Mon Jul 26 22:31:43 CEST 2010


2010/7/26 Adem <listmember at letterboxes.org>:
>  I am not sure if this has been proposed, but wouldn't it make life a lot
> easier if we considered the 'namespaces' metaphor as something that
> resembles to URLs.
>
> Here is an example:
>
> In the project file, I'd like to have these declarations:
>
> namespace Lazarus readonly url 'C:/Program Files/Lazarus';
> namespace FPC readwrite url 'C:/Program Files/FPC';
> namespace JCL readwrite url '//MyNAS/Pascal Files/Jedi/JCL';
> namespace MeObjects readonly url 'https://code.google.com/somepath';
> namespace GreatProject readwrite url
> '/user:password at ftp://ftp.someone.org/somepath';
>
> And, in the units themselves, here is what I'd like to see:
>
> uses
>  alias Delay namespace Lazarus path 'components\jcf2\Utils\Delay.pas';
>  alias Calc namespace FPC path 'trunk\ide\fpcalc.pas';
>  alias Serialization namespace JCL path
> 'source\windows\JclDebugSerialization.pas';
>  alias MeConsts namespace MeObjects path 'MeObjects\src\uMeConsts.pas';
>
> which can also be written as:
>
> uses
>  alias Delay as lazarus.components.jcf2.utils.delay;
>  alias Calc as fpc.trunk.ide.fpcalc;
>  alias Serialization as jcl.source.windows.jcldebugserialization;
>  alias MeConsts as meobjects.meobjects.src.umeconsts;
>
> [here, the last item in the 'as' path is assumed to have the extension
> '.pas']
>
> or, without aliases, this way:
>
> uses
>  lazarus.components.jcf2.utils.delay;
>  fpc.trunk.ide.fpcalc;
>  jcl.source.windows.jcldebugserialization;
>  meobjects.meobjects.src.umeconsts;
>
> Now, there's the 'path with spaces in it' problem. I think we should solve
> it the way HTML did.
> IOW. let there be %xx characters in the file names and paths [ see
> http://www.blooberry.com/indexdot/html/topics/urlencoding.htm ]

Please, see that:

http://lists.freepascal.org/lists/fpc-devel/2010-July/020699.html
http://lists.freepascal.org/lists/fpc-devel/2010-July/020791.html
http://lists.freepascal.org/lists/fpc-devel/2010-July/020856.html
http://lists.freepascal.org/lists/fpc-devel/2010-July/020934.html


MD



More information about the fpc-devel mailing list