Hello,

On Wed, Feb 20, 2013 at 9:22 AM, Klaus Ufo <klaus...@yahoo.fr> wrote:
> Hi there !
>
> We all know that the current PHP API has flaws. Maybe we could use namespaces 
> to build a new coherent PHP API ? Like :
>
> - \arr
> - \num
> - \str
>
> and so on. Advantages :
>
> - no more global functions

I actually like global functions even if most of the time I spend is in
OO code. I don't want / need to have simple scripts / crons that
are suddenly more complex to manage just because I can't have
them.

> - separation of concerns

While I understand the needs to be pure about things, I do think that
there's such a thing as too pure. Does the current way of things
break something?

> - backward compatibility

This would rather be a backward incompatibility if I understand this
correctly.

> - work can be done progressively
> - easy to add user-defined functions (using php namespaces)

I have no troubles in having my defined functions up and running as
they are now. The fact that they are always in the global scope makes
things much simpler for me when I want to do simple things.

> - we could provide a \str\utf8 namespace

Wasn't UTF8 a major pita and abandoned in favor of better things for
the moment?
>
> This is just an idea. I don't know what is your vision for a next PHP 6.
>
> KH
>

My vision for the PHP 6 is rather different that yours and if you want,
you can read about it here:
http://florinpatan.ro/2013/02/11/next-big-thing-in-php/
(sorry if I'm not allowed to share such links here).

And as Michael Shadle said, I'd rather have things like consistent
parameters order or named parameters or both rather that namespacing
functions like this.


Regards.
----
Florin Patan
https://github.com/dlsniper

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to