FROM : Kenny Leung
DATE : Sat Jul 08 02:57:47 2006
On Jul 7, 2006, at 5:50 PM, Erik Buck wrote:
>
>> One such example is the NSArray foundation class. I would like to be
>> able to express that I specifically have an NSArray containing only
>> objects of a certain type. This would allow me to (a) let the
>
> Just out of curiosity, why do you want this ? How often do you put
> the wrong kind of object in a collection in practice ? What
> determines "wrong" ? Do you have some objection to -
> respondsToSelector: in cases when you can't know in advance what
> objects might be in a collection that was provided to your code ?
My feelings exactly. If you are going to go through the work, you
should make sure that "the juice is worth the squeeze", so to speak.
I rarely bump into an error where I stuff the wrong object into a
collection, and if I do, it takes about 5 seconds to track it down.
Don't you want to spend your effort on features that will have a
larger effect on the time you spend coding, or significantly improve
the quality of your program?
-Kenny
DATE : Sat Jul 08 02:57:47 2006
On Jul 7, 2006, at 5:50 PM, Erik Buck wrote:
>
>> One such example is the NSArray foundation class. I would like to be
>> able to express that I specifically have an NSArray containing only
>> objects of a certain type. This would allow me to (a) let the
>
> Just out of curiosity, why do you want this ? How often do you put
> the wrong kind of object in a collection in practice ? What
> determines "wrong" ? Do you have some objection to -
> respondsToSelector: in cases when you can't know in advance what
> objects might be in a collection that was provided to your code ?
My feelings exactly. If you are going to go through the work, you
should make sure that "the juice is worth the squeeze", so to speak.
I rarely bump into an error where I stuff the wrong object into a
collection, and if I do, it takes about 5 seconds to track it down.
Don't you want to spend your effort on features that will have a
larger effect on the time you spend coding, or significantly improve
the quality of your program?
-Kenny






Cocoa mail archive

