Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!stjhmc!p88.f15.n300.z1.fidonet.org!Lawson.English From: Lawson.English@p88.f15.n300.z1.fidonet.org (Lawson English) Newsgroups: comp.sys.mac.programmer Subject: early and late binding in THINK C Message-ID: <4300.27D4F05E@stjhmc.fidonet.org> Date: 5 Mar 91 16:43:40 GMT Sender: ufgate@stjhmc.fidonet.org (newsout1.26) Organization: FidoNet node 1:300/15.88 - Tucson Apple Core, Tucson AZ Lines: 24 Chris Wright writes in a message to All you cast myToBeCast : (MySubClass *) myToBeCast -> uniqueToSubFn() CW> then all is sweetness and light. How come the compiler is smart CW> enough to allow runtime (or dynamic) CW> binding to the subclasses methods, but not smart enough to know CW> that myToBeCast is now a member of the subclass?????? Because it's not very smart? Seriously, do you know of any compiler that keeps track of type-casting? IE, if you do a "(char*) myInt", do you expect the compiler to remember that myInt was just used as (*char)? If not (and I'd love to see the headaches that THAT would cause if you found a compiler that would actually do it), why do you expect a compiler to remember the typecast for an object? I suppose that it could be built-in, simply for objects, but that sounds like pretty un-documentable behavior to me... Lawson -- Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!300!15.88!Lawson.English Internet: Lawson.English@p88.f15.n300.z1.fidonet.org