[fpc-devel] Namespaces like URLs

Adem listmember at letterboxes.org
Mon Jul 26 22:22:48 CEST 2010

  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:

   alias Delay namespace Lazarus path 'components\jcf2\Utils\Delay.pas';
   alias Calc namespace FPC path 'trunk\ide\fpcalc.pas';
   alias Serialization namespace JCL path 
   alias MeConsts namespace MeObjects path 'MeObjects\src\uMeConsts.pas';

which can also be written as:

   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 

or, without aliases, this way:


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 ]

More information about the fpc-devel mailing list