I will use an example:
$foo = substr($bar, 0, 5) . "-" . substr($bar, 5);
or
$foo = $bar[:5] . "-" . $bar[5:];
I would argue that the second line is hardly more cryptic than the
first one. And if we were concerned that concerned about duplicate
functionality, we probably wouldn't have SimpleXML and similar things.
-Andrei
http://10fathoms.org/vu - daily photoblog
On Oct 6, 2007, at 11:49 AM, Antony Dovgal wrote:
I believe it should be pretty clear that "too perlish" means "too
cryptic
and makes no sense because it duplicates already implemented
functionality
(more than one way to do it, yeah)".
But "too perlish" is much shorter.
--
Wbr,
Antony Dovgal
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php