[fpc-pascal] Namespaces Support

Fabrício Srdic fabricio.srdic at gmail.com
Sun Oct 27 14:33:19 CET 2013


2013/10/27 Marco van de Voort <marcov at stack.nl>

> In our previous episode, Fabr?cio Srdic said:
> > > used in Java and .NET as either languages don't have "units".
> > > Adding "features" just because "enterpise-class dev platforms" have
> them
> > > is more marketing move, than actual technical need.
> > >
> >
> > We can't nest units to form a hierarchical content. With namespaces, we
> > can.
>
> Yes. But that doesn't need renaming all existing units. It is that part
> that
> I think that is excessive.
>
> Embarcadero did it probably to keep their hands free for some long term VCL
> phase-out (IOW that they wouldn't have to rename FM to avoid VCL names).
>
> We don't have any major such problems, and thus renaming everything is a
> bit
> draconical to me. At least till we really have a reason to do so.
>
> > Furthermore, namespaces can be used to disambiguate identifiers with
> > the same name, eliminating the need to prefix our identifiers.
>
> That is the main reason why it is added to so many languages;
>
> BUT, Unit based Pascal never had that problem, since units already have
> their own namespace.
>
> Namespaces are only for pseudo hierarchical disambiguation of unit names in
> Pascal.
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>

In my opinion, the change of the fpc's base units to use namespaces is a
positive change. The side effect is that requires adjustment of the
existing codebase. I believe there are some approaches to address this
problem, if the fpc dev team decide to namespace base units. Maybe, unit
aliasing can be used.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20131027/59116d2d/attachment.html>


More information about the fpc-pascal mailing list