[fpc-devel] possible 'dynlibs' unit issue

Dariusz Mazur darekm at emadar.com
Tue Jan 19 19:24:16 CET 2010


W dniu 2010-01-19 19:00, Daniƫl Mantione pisze:
>
>
> Op Tue, 19 Jan 2010, schreef Dariusz Mazur:
>
>> Is this possible to forbid this at compile time?
>
> An easy solution is to wrap it inside a record. This is good practise 
> as it prevents accidental bugs like accidentally writing parameters in 
> the wrong order when calling a procedure. It's basically the point of 
> type safety.
Yes. I use this very often. But it is possible only for new types. When 
we want to test or protect some sort of operation on huge source its harder.
Operator overloading is enough  but lack something that detect invoke of 
this function. And its not only for this solution, appliance is much 
wider (f.e. generics)


-- 

   Darek







More information about the fpc-devel mailing list