Hi!
And I'd ask - who wants to do new DB::mysql when they can just do mysql?
I do. Because this way I don't have to worry my mysql would clash with
someone other's mysql, and I can have all DB related stuff under one roof.
The common usage of use is going to be to get the name as short as
possible, and NOT have to type out db:: everywhere. Do you have code
There never was a task to make use of as little characters as possible.
If you think that was the point, you are mistaken. There were a task to
make it manageable, but not at the cost of clarity and robustness and
performance.
using namespaces? I have some I can point you to of mine.
OK, if you send me the code, I maybe could help you with how to use
namespaces the best way there, if you want the help.
Then let me rephrase "Useless to me" - as they are functions in
OK, I am sorry that they are useless to you. I hope you have better luck
with next feature. However, you can not realistically expect features in
PHP be based on your personal taste only, can you?
> namespaces are useless to me - they do not do what I think they should
> and do not solve a problem any better than a class with static methods.
Apparently for people that asked for namespaced functions to be added
after classes already were in, they do. You disagree with these people -
fine.
You seem to be under the impression that the people writing templates
are as skilled in PHP as the people writing the code using the templates
(or are the same people) - sadly that's very often not the case.
OK, suppose it is not. How not knowing what strlen actually does helps
you in this case? I'd say more clear the function is - both name and
what it is intended to do - less chance someone would screw up. If you
have unicode::strlen and just strlen, chances that somebody would do
unicode::strlen($binary_data) or strlen($unicode_name) drop significantly.
The bottom line is ... I've given you reasons that I would want to alias
functions...and you seem to be doing nothing more than saying "don't
design it that way" - which quite frankly seems silly. If there's a
Well, it doesn't seem silly to me. There are right ways to use
namespaces and wrong ways. You insist on using them wrong way and want
to make it easier to use them wrong way. I think it is a bad thing to
make it easier to use things in wrong way.
good technical reason why you think function_alias wouldn't work other
I could live with having function function_alias() - though I think you
are dangerously close to runkit() territory. But having function is one,
having it in language syntax is another - that is practically
endorsement. And I don't want to endorse aliasing functions, especially
when primary reason seems to be not having : character in names and
saving a couple of keystrokes. It is fine to have tastes, it's just IMHO
not enough for putting it into the language syntax.
--
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