Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66037 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64497 invoked from network); 20 Feb 2013 09:41:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2013 09:41:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=mike503@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=mike503@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.49 as permitted sender) X-PHP-List-Original-Sender: mike503@gmail.com X-Host-Fingerprint: 209.85.160.49 mail-pb0-f49.google.com Received: from [209.85.160.49] ([209.85.160.49:54797] helo=mail-pb0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 88/58-19387-B3A94215 for ; Wed, 20 Feb 2013 04:41:15 -0500 Received: by mail-pb0-f49.google.com with SMTP id xa12so2778543pbc.8 for ; Wed, 20 Feb 2013 01:41:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:references:in-reply-to:mime-version :content-transfer-encoding:content-type:message-id:cc:x-mailer:from :subject:date:to; bh=mKiM2JlcHliKOL8fcenD3nYn3EBT07whYkpeBbdRClE=; b=z1kLeuqpGxwuZpdFh6W0jSv75Lyyiv41JwRBJdLF2ZvUyOTSdrQ7Vp4MXM59wRruPg zflXDcsWuZ1/eYy4ErY8VYH6pfPkLyhoLO/eD00ymQ2H3IYMwybXL/E6hKNhb3+cTCJQ kCSEU0ahynHs1hP8iMawnCdNzUwD97g7CshjL62vu6sDXqAo5f6D8fiM0gKWjVmDQCUa VfG774aEH4zNIZRG9SH3Wp08x85Pvw6d21Fl3FQBaz2zrZSGRyieMU5TcorY3QrGg3Yz p6He57QkUhL2C2Yy4Y8RutjcEZ6llfmH15yuJK2JhXojlhxI4ZU7Ce5+HnoMlkoZcJsX Fb6g== X-Received: by 10.68.251.167 with SMTP id zl7mr48271326pbc.116.1361353272791; Wed, 20 Feb 2013 01:41:12 -0800 (PST) Received: from [10.113.109.217] (mobile-166-147-081-206.mycingular.net. [166.147.81.206]) by mx.google.com with ESMTPS id d8sm110678159pax.23.2013.02.20.01.41.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Feb 2013 01:41:11 -0800 (PST) References: <1361344921.21988.YahooMailClassic@web171605.mail.ir2.yahoo.com> <51247F6C.5040309@oracle.com> In-Reply-To: <51247F6C.5040309@oracle.com> Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-ID: Cc: "internals@lists.php.net" X-Mailer: iPhone Mail (10B146) Date: Wed, 20 Feb 2013 01:41:07 -0800 To: Klaus Ufo Subject: Re: [PHP-DEV] PHP 6 : a new API ? From: mike503@gmail.com (Michael Shadle) On 02/19/2013 11:22 PM, Klaus Ufo wrote: > Hi there ! >=20 > We all know that the current PHP API has flaws. Maybe we could use namespa= ces to build a new coherent PHP API ? Like : >=20 > - \arr > - \num > - \str >=20 > and so on. Advantages : >=20 > - no more global functions > - separation of concerns > - backward compatibility > - work can be done progressively > - easy to add user-defined functions (using php namespaces) > - we could provide a \str\utf8 namespace >=20 > This is just an idea. I don't know what is your vision for a next PHP 6. >=20 > KH >=20 I'm aware people complain about PHP flaws, but having misc global core funct= ions for strings, arrays and other data types is a new one. I am still a purest at heart and don't see the need for namespacing in gener= al. I am thinking it provides some lower level memory space improvements and= less conflicts, but I feel like if you can't code in global space perhaps y= ou should be rethinking how you code. I don't think most people care about t= he lower level advantages, they're just looking at it from a code laziness p= erspective. Why make \bar\baz\foo() or $bar->baz->foo() instead of bar_baz_foo()? Prefix= ing functions seems perfectly effective. I see a lot of code that looks like= they're using namespaces or OO just to group things together and organize c= ode in some fashion. Not because there's any inherent benefit. I'd much rather see effort taken on renaming functions to be more consistent= , and making needle/haystack consistent, and maybe throw in named parameters= . PHP is getting too complex as it is. Signed, PHP purest at heart, (who has code that has lasted for a decade and multiple= major php code changes still did not break it)=