[fpc-pascal] Feature announcement: default namespaces

Mattias Gaertner nc-gaertnma at netcologne.de
Sun May 6 08:46:02 CEST 2018


On Sun, 6 May 2018 09:11:23 +0700
Ryan Joseph <ryan at thealchemistguild.com> wrote:

> > On May 6, 2018, at 12:23 AM, Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> > 
> > For some users it might be cumbersome however to write the complete names (even though their IDE of choice might support them here) or maybe they have different sets of units with same names and interfaces, but different namespaces (e.g. ProductX and ProductY which contain wrappers units for the 3rd party products X and Y with a common interface). Of course in the latter case these can be switched using ifdefs or some creative usage of macros, but that can be done simpler.  
> 
> I don’t understand what this is for because “namespaces” in FPC are optional anyways right? I’ve only used them to resolve name conflicts but if they’re optional then doesn’t that implicitly imply they're default also? Maybe a concrete example would help to explain.

He meant:
If you use units with namespaces and you can't use the -FN option, then
it becomes cumbersome to write them. Then a unit directive would be
nice to have.

Mattias



More information about the fpc-pascal mailing list