Hi!
Sure. But one needs to understand the language. Otherwise the reader
needs to go hunting around a dictionary (or in our case, the source code)
to figure out what the heck the person (code) is trying to say (do).
Chaining produces code that is not self-documenting.
If you don't understand the language, nothing is self-documenting. If
you have the basics, you'd be able to understand that if foo()+1 means
"take result of foo() and add one", then foo()() would be "take result
of foo() and call it as a function". Adding temp var would be just like
writing $number = foo(); $number_plus_one = $number+1; - excessive
verbosity with no added value. It's like writing comments in style of:
foo(); // call foo() - surely it's documented, but not useful in any way.
--
Stanislav Malyshev, Zend Software Architect
s...@zend.com http://www.zend.com/
(408)253-8829 MSN: s...@zend.com
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php