operator is definitely easier because it lets us reuse the same syntax
for strings and arrays (and people would need to learn one operator

Having same syntax mean two different things (string access / array access) doesn't qualify as "easy" in my book anyway. I know there's a language which uses only 8 characters for everything (since this is a family-oriented mailing list, I'm not going to mention it by name ;) - but it is hardly easy. I would be kind of OK if we made substring operator be {X:Y}, but for array operator I don't really see how it's substantially better than calling array_splice. It has a bit less characters to type, but less typing is not always better. It also doesn't make sense in a lot of array contexts (what is $a["apples":"oranges"]?) so it doesn't extend old [] syntax naturally.
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to