Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48043 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71462 invoked from network); 21 Apr 2010 14:28:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Apr 2010 14:28:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=addw@phcomp.co.uk; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=addw@phcomp.co.uk; sender-id=permerror Received-SPF: pass (pb1.pair.com: domain phcomp.co.uk designates 78.32.209.33 as permitted sender) X-PHP-List-Original-Sender: addw@phcomp.co.uk X-Host-Fingerprint: 78.32.209.33 freshmint.phcomp.co.uk Linux 2.6 Received: from [78.32.209.33] ([78.32.209.33:62963] helo=mint.phcomp.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/B7-63467-29B0FCB4 for ; Wed, 21 Apr 2010 10:28:36 -0400 Received: from addw by mint.phcomp.co.uk with local (Exim 4.63) (envelope-from ) id 1O4aug-00046K-49; Wed, 21 Apr 2010 15:28:26 +0100 Date: Wed, 21 Apr 2010 15:28:26 +0100 To: Jacob Oettinger Cc: Stan Vassilev , Stanislav Malyshev , Adi Nita , internals@lists.php.net Message-ID: <20100421142826.GO5201@phcomp.co.uk> Mail-Followup-To: Jacob Oettinger , Stan Vassilev , Stanislav Malyshev , Adi Nita , internals@lists.php.net References: <4BCE44B8.6060600@zend.com> <52D97E557393477BB08167B13DEF4679@pc> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Organization: Parliament Hill Computers Ltd Subject: Re: [PHP-DEV] A critique of PHP 6 From: addw@phcomp.co.uk (Alain Williams) On Wed, Apr 21, 2010 at 04:18:47PM +0200, Jacob Oettinger wrote: > > On 21/04/2010, at 16.03, 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(); > > > > Yes. Maybe implemented so that they can be called like functions in a namespace for each type with the "this" value as the first param. So that: > > $array->merge($array2); > <=> > \array\merge($array, $array2); > > and > > \string\len($string); > <=> > $string->len(); We then run into a danger of conflict with a user defined namespace \array. Could I suggest the _ prefix trick, so that the above, if we do it, becomes: \_array\merge($array, $array2); \_string\len($string); Ie all 'internal' ones start '_', such names *should* not be used by programmers. 'should', I did not write 'may'. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php Past chairman of UKUUG: http://www.ukuug.org/ #include