FROM : Thomas Davie
DATE : Sat Jul 08 02:42:59 2006
On 8 Jul 2006, at 01:41, Shawn Erickson wrote:
> On 7/7/06, Rob Ross <<email_removed>> wrote:
>
>> I'm just learning Obj-C myself, so maybe my understanding is not
>> correct. But, don't you actually have the option to use static typing
>> in certain instances, and use dynamic typing in others?
>>
>> Eg:
>>
>> id myStr;
>>
>> vs
>>
>> NSString *myStr;
>>
>> Won't the second version give you the benefits of static typing
>> (compiler time checking)?
>>
>> So my understanding is you can have the best of both worlds. Or have
>> I misunderstood something?
>
> Correct.
That is correct, but can you specify for me an NSArray containing
only items that respond to a specific display method?
This is the sort of check that I would like to be able to do at
compile time.
Bob
DATE : Sat Jul 08 02:42:59 2006
On 8 Jul 2006, at 01:41, Shawn Erickson wrote:
> On 7/7/06, Rob Ross <<email_removed>> wrote:
>
>> I'm just learning Obj-C myself, so maybe my understanding is not
>> correct. But, don't you actually have the option to use static typing
>> in certain instances, and use dynamic typing in others?
>>
>> Eg:
>>
>> id myStr;
>>
>> vs
>>
>> NSString *myStr;
>>
>> Won't the second version give you the benefits of static typing
>> (compiler time checking)?
>>
>> So my understanding is you can have the best of both worlds. Or have
>> I misunderstood something?
>
> Correct.
That is correct, but can you specify for me an NSArray containing
only items that respond to a specific display method?
This is the sort of check that I would like to be able to do at
compile time.
Bob






Cocoa mail archive

