FROM : Shawn Erickson
DATE : Sat Jul 08 03:25:24 2006
On 7/7/06, Damien Sorresso <<email_removed>> wrote:
> On 7 Jul, 2006, at 8:07 PM, Shawn Erickson wrote:
> > ...but the point is you could implement classes that are specific
> > about what they return (I often do that with my init methods) and the
> > compiler would flag this for you.
>
> But you must also remember that this only works for classes *you*
> write. You cannot statically type Apple's classes in the way you
> would if they were written in C++ because, without any exception I'm
> aware of, all their `init' methods return the `id' type.
Obviously.
DATE : Sat Jul 08 03:25:24 2006
On 7/7/06, Damien Sorresso <<email_removed>> wrote:
> On 7 Jul, 2006, at 8:07 PM, Shawn Erickson wrote:
> > ...but the point is you could implement classes that are specific
> > about what they return (I often do that with my init methods) and the
> > compiler would flag this for you.
>
> But you must also remember that this only works for classes *you*
> write. You cannot statically type Apple's classes in the way you
> would if they were written in C++ because, without any exception I'm
> aware of, all their `init' methods return the `id' type.
Obviously.






Cocoa mail archive

