Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24683 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66486 invoked by uid 1010); 19 Jul 2006 15:35:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 66449 invoked from network); 19 Jul 2006 15:35:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jul 2006 15:35:24 -0000 Authentication-Results: pb1.pair.com header.from=boards@gmail.com; domainkeys=good DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: boards@gmail.com X-Host-Fingerprint: 64.233.166.177 py-out-1112.google.com Linux 2.4/2.6 Received: from ([64.233.166.177:31833] helo=py-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 27/FC-11992-6CF4EB44 for ; Wed, 19 Jul 2006 11:29:11 -0400 Received: by py-out-1112.google.com with SMTP id s49so347342pyc for ; Wed, 19 Jul 2006 08:29:07 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:reply-to:organization:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:to:message-id; b=uqt4/TrOdgY8E/ziVYduaYHcI/VYXfXMemZcBz9pSGLFkxb0EdjikLw3xVconylTLAJHYYrjs8uYpfPgz6og0BYukLHekjwzDDBwAmvBK4wWBktRhkhVhcYa1ZTtxAr756wlYxykjSVi1AABOwZU0fSWZu7/51E0LjzpvMyVKJ8= Received: by 10.35.37.13 with SMTP id p13mr1262263pyj; Wed, 19 Jul 2006 08:29:07 -0700 (PDT) Received: from vaio ( [67.184.91.45]) by mx.gmail.com with ESMTP id w76sm693703pyd.2006.07.19.08.29.07; Wed, 19 Jul 2006 08:29:07 -0700 (PDT) Reply-To: boards@gmail.com Organization: LX Date: Wed, 19 Jul 2006 10:29:09 -0500 User-Agent: KMail/1.9.3 Cc: internals@lists.php.net References: <200607181203.56676.boards@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1386763.zCA49pTRXy"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit To: Undisclosed.Recipients: ; Message-ID: <200607191029.09833.boards@gmail.com> Subject: Re: [PHP-DEV] Re: PHP 5.2 Status Update From: boards@gmail.com (Matt Sicker) --nextPart1386763.zCA49pTRXy Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 18 July 2006 12:25, Derick Rethans wrote: > On Tue, 18 Jul 2006, Matt Sicker wrote: > > Maybe you might not want to include that class until PHP6. Or, how > > about for backwards compatibility, you do prefix the class name > > with PHP, but when namespaces come into play, using the php > > namespace effectively removes the PHP prefix (e.g. PHPDate =3D=3D > > php::Date). > > If you rename it later it will definitely break at that moment, so > that's a no-no. > > Derick What I'm suggesting is that for PHP6, allow namespaces to be used in two=20 different ways. Example: namespace foo { class bar { private $baz; static private $oof =3D 0; function __construct($baz) { $this->baz =3D $baz; $this->oof++; # I don't remember if you can do this, but you get # the idea } static function getOof() { return $this->oof; } } } Then, we can access class `bar' like so: $bar =3D new foo::bar('e.g.'); $oof =3D foo_bar::getOOf(); Or, you might just remove the underscore altogether so that we can=20 introduce more useful namespaces (e.g. all the DOM classes can go in=20 the DOM namespace). Perhaps you could use the underscore for functions=20 (!methods), thus also allowing many functions to be given their own=20 namespaces (e.g. mysql_connect() =3D=3D mysql::connect()). Now since you would be able to declare something like: using namespace mysql; You'd be able to access its functions like so: $db =3D connect('localhost', 'username', 'password') or=20 die(header('HTTP/1.1 500 Internal Service Error')); Now that might not be a good example considering mysql_* is old and=20 crappy, and since using a mysqli example would be redundant since it=20 already has a class, well, you know... Anyhow, any feedback on this? Or should I post this separately to get=20 feedback since it regards PHP6? =2D-=20 Matt Sicker --nextPart1386763.zCA49pTRXy Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQBEvk/F5tcAKF5t41MRAjSGAJ48wBarEPq+Abex8zqyGTimZNwMmwCeIG8R u9zdKOajFWI2rKNJtQPjsls= =In6x -----END PGP SIGNATURE----- --nextPart1386763.zCA49pTRXy--