Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66041 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70423 invoked from network); 20 Feb 2013 09:53:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2013 09:53:08 -0000 Authentication-Results: pb1.pair.com smtp.mail=florinpatan@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=florinpatan@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.49 as permitted sender) X-PHP-List-Original-Sender: florinpatan@gmail.com X-Host-Fingerprint: 209.85.219.49 mail-oa0-f49.google.com Received: from [209.85.219.49] ([209.85.219.49:37671] helo=mail-oa0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 79/A9-19387-20D94215 for ; Wed, 20 Feb 2013 04:53:06 -0500 Received: by mail-oa0-f49.google.com with SMTP id j6so7770260oag.22 for ; Wed, 20 Feb 2013 01:53:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=f9r4A20g86cathBbuSTAvX7fX45vntI7vfqiuxBhios=; b=Occ/lkcdu/v94n9N0KaegNL7a3M2xT7oEKFwrk2gyTFeZUDFbEroGPnTjm2eR8aJ+d VdOrZZwrVIfaVjGqOqBd//xxcvAvramSr5rZIa8NJ2yHrjOWTx62hGAp3VUEP1yYQiC4 CGFXBEwQAeAnuDs58aBrKohq0IOaGSKsbS2rMQWKIACXMD/F6WMQUn500D+J5g7gtyB1 e7m4gQnX+L7rzatg8tI/KWWQq4Oexe1pVPQfE/EU/owQn1VLSia/PCp2SZYgMITFT91t GZlzFoM7T73yHC6NtdDUb3vTtrHjIQO7CP29MDNH5XEKSoDQC5XSaxFWOHRtsaP1O8yW sBZQ== X-Received: by 10.182.220.10 with SMTP id ps10mr9199925obc.21.1361353983885; Wed, 20 Feb 2013 01:53:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.76.169.3 with HTTP; Wed, 20 Feb 2013 01:52:33 -0800 (PST) In-Reply-To: <1361344921.21988.YahooMailClassic@web171605.mail.ir2.yahoo.com> References: <1361344921.21988.YahooMailClassic@web171605.mail.ir2.yahoo.com> Date: Wed, 20 Feb 2013 11:52:33 +0200 Message-ID: To: Klaus Ufo Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] PHP 6 : a new API ? From: florinpatan@gmail.com (Florin Razvan Patan) Hello, On Wed, Feb 20, 2013 at 9:22 AM, Klaus Ufo 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