[fpc-pascal] Namespaces Support

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

2013/10/27 Dmitry Boyarintsev <skalogryz.lists at gmail.com>

>  D2010 have introduced the namespace feature and DXE2 "forced" us to
>> adjust our existing code base to its new unit scope names - namespace of
>> its base units - but in return it give us new possibilities to organize our
>> existing code base through namespaces, a feature that is present in all
>> other entreprise-class dev platforms - e.g Java and .NET - promoting code
>> reuse and providing us a more clear RTL and API.
> As Marco said earlier (multiple times in other threads) namespaces are
> 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. Furthermore, namespaces can be used to disambiguate identifiers with
the same name, eliminating the need to prefix our identifiers. It's a pure
techinical argument. This is not about "just because enterprise-class
platforms have them".

> I must assume you had no problems organizing your code while working D2009
> w/o namespaces?
> Were you unable reuse the code you wrote without namespaces? Were your
> units and code that you created unclear to you?

Yes, i had no problems while working with D2009 and my units weren't
unclear. But with the use of the namespace feature, organizing my code got
much better and new possibilities were added.

 Other examples include the addition of Generics and the changes to many
>> classes like TList and so on.
>> Today, after "forced" us to adjusting our code base many times, Delphi
>> provide us generics, closures, namespaces and internationalization support.
>> Its a great evolution, do not you think?
> No, these are sales points and language overloading features.
>> On the other hand, fpc community seems to be resistent to implement some
>> improvements - sorry, "changes" - that Delphi already has because it
>> "forces" the users to adjust some peaces of their existing code base.
> Of course.
> I had to pay for a new compiler that forces me to spend more time (and
> money) to update the existing code, that has been debugged and possibly
> introduce new bugs and loose even more time (and money) by fixing them?
> I seriously doubt. That's why there're companies who are still using D6+
> as well as 3d components are keeping up with D6+ compatibility..
> That's also another reason, why they would stick to the good-old Delphi,
> rather than try to port their code to FPC/Lazarus.
> So, what do you mean when say "be better than Delphi"? Be more backward
>> compatible and in other hand have fewer features than Delphi?
>> I really don't understand this kind of reaction.
> Well, this is not a real discussion anymore, but a pure flame. So before
> Jonas comes in and sends everyone to fpc-other, I'd say the following:
> You don't have to understand. Just follow the corporate guide blindly.
> Every new feature is a bless. Spend you time and money in constant update
> of what you have. Btw, they probably have a business plan of releasing the
> new compiler version (yes - with new features) every other year.
> thanks,
> Dmitry
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

They couldn't use Delphi 6 forever, as the Windows and the hardware changes
more and more. What will happen when they have to change?

I'm sorry, was not my intention to cause any discomfort or raise a flaming

Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20131027/52915267/attachment.html>

More information about the fpc-pascal mailing list