On Tue, Oct 29, 2013 at 1:31 PM, leledumbo <leledumbo_c...@yahoo.co.id> wrote:
>> Another type of conflict happens -- but no one talks about it -- using
> procedure/function with the same parameters in different units.
> Eg: GetHandler();  If you use two units that have a GetHandler
> function, in a third unit, you have a trouble.
> Do you (all) use prefix in Procedures and/or Functions too?  ;-)
>
> It's a FEATURE, not a trouble. I often use it to switch between two
> implementations of certain functionality, treating the unit as singleton
> object.

I know this is part of language... but problems can happen eg:
You can add a new unit, maybe a 3rd-party, called A3rdFunc.pas that
have the same function (GetHandler) what you already use in another
unit called MyFunc.pas.
Someday you will add the A3rdFunc unit on 'uses' -- AFTER the MyFunc
-- and now your program can be broken.

Marcos Douglas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to