Grarh. PHP is a stupid language with no sort of function naming or design conventions being apparent. Half the functions take parameters in "block, snippet" order, and half the reverse. But most pointedly annoying to me is the horrible application of, then deviation from set theory in function naming; "array_intersect", "array_diff" and "array_union". Oh, wait, no, not array_union at all, because that would complete the set. Instead there's array_merge, which, admittedly, doesn't actually fulfil the function of a union operator, but nor does it actually perform a merge. Its functionality would be better named array_join, or, better still, array_append.
The lack of array_union is still irksome in that there's an incomplete set; it's an unnecessary function, in that one can easily emulate it with "array_merge(array_diff($a,$b),$b)", but unnecessariness doesn't stop PHP making all sorts of other unnecessary redundancies, does it? Inconsistency is the word of the day. [17:55] [6 comments]
|
|