On 23.09.2008, at 05:39, Larry Garfield wrote:
"Most of the functionality could be easily achieved using static class
methods".
As someone who uses both functions and classes with equal comfort, I
have to
say "GAH, NO NO NO!" to that statement. Classes as pseudo-
namespaces are
fundamentally wrong. Conceptually they're entirely different
things. I have
to shut people down every time they try to suggest that in Drupal.
It's not just a conceptual issue, either. For a very practical
example,
consider that a namespaces can be split across any number of files.
A class
must be all in one file. That means if you want to group functions
together,
they MUST all be in one single monolithic file. That makes them,
sorry,
useless for anything even remotely interesting.
No, namespaces for functions can most certainly *not* be emulated
with either
variable functions or static methods. Dropping namespace support for
functions makes namespaces mostly useless for anyone who is not 100%
OOP.
There's no reason to make functions second-class citizens (no pun
intended).
sure point taken on the monolithic files, when sticking different
functions into classes just for the sake of them then becoming
namespaceable. but how would allowing functions in namespaces solve
this issue?
regards,
Lukas Kahwe Smith
[EMAIL PROTECTED]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php