[fpc-pascal] Re: How to avoid namespace name clashes after USES ?

Timothy Madden terminatorul at gmail.com
Tue Aug 21 18:43:02 CEST 2012

On 08/21/2012 03:10 PM, Jorge Aldo G. de F. Junior wrote:
> "With no error messages, or even with no changes to the program since 1
> and a half year in the repository, the scientific calculations are now
> all blown up, and program outputs only errors at runtime. The maintainer
> now curses and chases me for having the nerve to leave a program
> known as working in such a horrible mess in the repository."
> Never tested, but doesnt the compiler warn of the colision ? if not, it should.

The problem is the language exposes my program to the risk of future
collisions from the units I use.

A warning is a little beyond the scope of this problem, because my
program is working perfectly as of now.

But next year, some unit I use will have reached a new version, and if I
merely recompile my program I have already have a conflict, that was not
there last year.

And the new version for the unit in question is fully compatible with
the old one, so you would say my code should still compile.

The question here is if it would be possible for the language to prevent
this problem, like python (and others) do.

Otherwise, I could never upgrade a library, even if the vendor announces
full compatibility with the previous version. Because I will still
expose my old code to the risk of new collisions.

Even worse, as the language currently stands, it is possible to upgrade
a unit to a compatible version and get a different behaviour from my
program. Without a single warning from the compiler.

Thank you,
Timothy Madden

More information about the fpc-pascal mailing list