Ryan Joseph <r...@thealchemistguild.com> schrieb am So., 6. Mai 2018, 09:16:

>
>
> > On May 6, 2018, at 1:46 PM, Mattias Gaertner <nc-gaert...@netcologne.de>
> wrote:
> >
> > 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.
>
> But does FPC have actual namespaces besides prefixing unit names? What
> exactly are "units with namespaces”?
>

They are also named "dotted units" and as I wrote in y announcement mail
Object Pascal doesn't have namespaces in the sense of languages like C#,
C++ or Java that allow for deep hierarchies and such.
The namespaces in Object Pascal are merely a convenience thing. E.g. Delphi
prefixed many of the existing units (like SysUtils became System.SysUtils,
Windows became WinApi.Windows and Forms became VCL.Forms (or so)). They did
this so that FireMonkey units can share unit names with the VCL (e.g.
FMX.Forms). But to keep backwards compatibility with old code Delphi
projects have by default their default namespace list set to something like
"System, WinApi, VCL" so that such code continues to compile.

In FPC we currently don't use dotted unit names much, but maybe that will
change in the future.

Regards,
Sven

>
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to