hi all,
I wanted to forward this message along, and also ask some questions:
-Are there any plans to support packages / modules properly? (ala python,
which looks very nice, or I suppose java, etc).
-Are there plans to restore support for namespaces? The current PEAR method
of naming classes is the only sensible one given the engine's capabilities,
but we (and I would imagine they too) find it to be extremely ugly and
inelegant - something forced on us by the missing features in PHP5.
I would like to see full hierarchical namespace support.
-Has anyone thought of including a unitTest framework in pecl, so unit tests
could be tightly integrated with the engine?
Of course all this complaining is because we see the engine has become quite
seriously capable when compared to PHP4 - it's a HUGE leap - but we need
juuuuuuust a little more to really compete with the biggies.
I think PHP, with version 5 - has the potential to be a "major" language -
but it needs just a bit more of a gentle push to get there. I think those
features would do it.
I love python's system of modules: incredibly easy to use and explain, it
works well, and it provides a clear method for structuring code. Something
similar in PHP is welcome, and I trust the PEAR people to help set
guidelines. Of course we would like to contribute to that process as well,
if it happens.
The message:
<ouch>yeah, welcome to the gradual let-down that has been the history of PHP5.
But seriously ... one thing after another was pulled from the language
since it was hard to get it working properly. loss of namespaces, magic
__toString() was made unmagical, recently optional typehinted parameters
were removed ...namespaces would have been a huge benefit to PHP. pobably almost as
huge as exceptions. IMO the pear prefix solution is pretty dumb; if
prefixing makes sense (and it often does), then I think having a unique
name (like BC_ for Binarycloud) is a lot more reasonable than
PHP_Framework_Binarycloud_Init, which is what PEAR does (makes the
category part of the class names).I sure hope that namespaces gets reconsidered for 5.1 (which is supposed
to follow 5.0 fairly quickly, as there are many features now that are
being postponed due to feature freeze). things like lack of namespace
support makes me look increasingly at Mono/ASP.NET for building big OO web
applications.
_alex
--
alex black
founder, ceo
the turing studio, inc.
project leader
binarycloud
mail: root@turingstudio.com
url : http://www.turingstudio.com
tel : 510.666.0074
fax : 510.666.0093
alex black wrote:
Are there any plans to support packages / modules properly?
There is "Yet Another RfC for Namespace" [1] that I wrote almost a year
ago. Timm did a preliminary implementation based on the above design but
we came to the conclusion to postpone the discussion / inclusion until
after the PHP 5.0 release.
--
[1] http://www.sebastian-bergmann.de/stuff/rfc_package.txt
--
Sebastian Bergmann
http://sebastian-bergmann.de/ http://phpOpenTracker.de/
Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/