Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48044 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84867 invoked from network); 21 Apr 2010 14:45:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Apr 2010 14:45:12 -0000 X-Host-Fingerprint: 64.8.134.189 unknown Received: from [64.8.134.189] ([64.8.134.189:7520] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CC/BA-63467-87F0FCB4 for ; Wed, 21 Apr 2010 10:45:12 -0400 To: internals@lists.php.net,Sean Coates , Derick Rethans , Message-ID: <4BCF0F75.4040500@gmail.com> Date: Wed, 21 Apr 2010 09:45:09 -0500 User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 Stan Vassilev , Lukas Kahwe Smith References: <4BCE44B8.6060600@zend.com> <4BCEFC93.7010508@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 64.8.134.189 Subject: Re: [PHP-DEV] A critique of PHP 6 From: rpanning@gmail.com (Ryan Panning) Sean Coates wrote: > I don't believe there's anything stopping you (or other users) from creating either userspace or extension wrappers to handle organization and consistency. You could even use the "system" namespaces, since they don't exist. True, the thought has crossed my mind. But I'm more concerned about performance than organization. I don't know how to make a C extension, but rather would have to make a PHP namespace. Derick Rethans wrote: > No, it would me having two implementations. Although I don't know C, couldn't you do something like: namespace Foo; funciton bar($arg1, $arg2) { return foo_bar($arg2, $arg1); } Stan Vassilev wrote: > Ahem. We all secretly know how it should've been from the very start. > Pseudo-methods for the basic types. > > $array->merge($array2); > $string->len(); I like this. Although wouldn't this be more of a strict data type way of doing things? Lukas Kahwe Smith wrote: > Right, if we ever namespace internal stuff (obviously there would be a > need for some out of the box BC extension), than this would be the > moment to fix stuff like this. > > Anyways, if anyone cares about any of the above proposals write up an > RFC (or champion an existing one). Lets not end up in a situation > where we have to refer people to the archives to understand a previous > decision ever again. I'm sure it would be a huge undertaking, I'm just saying that it would be nice to see. If I knew C I would try to help out, unfortunately I don't yet. That is why these are all just my comments. I can't act on them but want to voice my opinion. Again, it's up to all the great developers here. There are a couple good proposals out there, either would fit. But, is there something like type check foo(string $message) vs casting foo((string) $message)? Thanks, Ryan