FROM : Gregory Weston
DATE : Sat Jul 08 03:00:11 2006
Thomas Davie wrote:
> However, when we are dealing with much more abstract concepts such as
> objects, we generally know what our data structures are. We know how
> they are going to be used, and we know what they should and should
> not do.
But notice what you said there. Or what you didn't. You indicated
that we know and care about _behavior_. Not structure, nor
appearance, nor type. We just want to know that when we send "this
message" we'll get a response that, itself, only needs to conform to
certain behavior. We don't really want collections to be of certain
specific types because there's no reason to restrict a collection to
holding only one type of data. That may not be so obvious for a
traditional integer-index array, but consider an associative array. I
rarely want a dictionary in which _every_ key is a string and _every_
value is a numeric value.
DATE : Sat Jul 08 03:00:11 2006
Thomas Davie wrote:
> However, when we are dealing with much more abstract concepts such as
> objects, we generally know what our data structures are. We know how
> they are going to be used, and we know what they should and should
> not do.
But notice what you said there. Or what you didn't. You indicated
that we know and care about _behavior_. Not structure, nor
appearance, nor type. We just want to know that when we send "this
message" we'll get a response that, itself, only needs to conform to
certain behavior. We don't really want collections to be of certain
specific types because there's no reason to restrict a collection to
holding only one type of data. That may not be so obvious for a
traditional integer-index array, but consider an associative array. I
rarely want a dictionary in which _every_ key is a string and _every_
value is a numeric value.






Cocoa mail archive

