|
From: | Philip Mötteli |
Subject: | Key-Value Operators on Array |
Date: | Thu, 6 May 2004 18:37:12 +0200 |
HiUsually, every key-value operation, that is applied to an array, is applied to its contents. So the array is actually transparent.
There are certain exceptions though: @avg @count @distinctUnionOfArrays @distinctUnionOfObjects @max @min @sum @unionOfArrays @unionOfObjectsThey are all marked by a preceding '@'. All these operators are sent to the array object itself and not to the objects it contains.
My question, proposal is: Why not use this '@' as a general mark, that an operator should be sent to the array itself? Not restrict its use to these few mentionned predefined operators? This wouldn't be a problem for code written for Cocoa. Cocoa would just not have that feature and (probably) raise an exception.
Or is there perhaps another way to do that and I'm just missing something?
Re Phil
[Prev in Thread] | Current Thread | [Next in Thread] |