GPC and Mac implicit pointer objects

Peter N Lewis peter at stairways.com.au
Sun Jul 3 03:47:17 CEST 2005


>I think so. We have some problems with function pointers. Another
>thread a while ago pointed me to them, but they seem difficult to
>fix, and I haven't done this yet. (In that thread, AFAIR, Waldek
>fixed the problem at hand, and also noted the deeper problems.) So
>this should happen sooner or later (I hope sooner ;-).

This issue I have with function pointers is two fold:

Not being able to cast them to/from an arbitrary pointer (which makes 
storing them or passing them through a confined interface where 
procedure types are not appropriate challenging), and not being able 
to case one procedural variable to another one, even if they are 
reasonably compatible.

While both these restrictions may have safety reasons, generally I 
end up needing to do them anyway to comply with various restricted 
interfaces, which then means I have to find some other way of 
complying, such as changing all the parameters to exactly match a the 
specification, and then casting the all back again inside the 
procedure or such, which really does not improve safety.

Still, I can live with this, it's just a nuisance.  To my mind, type 
casts exist to allow me to say "I know what I'm doing, it may not be 
safe, but I have made the conscious decision by putting the type cast 
explicitly in the code that I want to proceed".
    Peter.
-- 
<http://www.stairways.com/>  <http://download.stairways.com/>




More information about the Gpc mailing list