Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23747 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61255 invoked by uid 1010); 28 May 2006 09:17:37 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 61240 invoked from network); 28 May 2006 09:17:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 May 2006 09:17:37 -0000 X-PHP-List-Original-Sender: cschneid@cschneid.com X-Host-Fingerprint: 195.226.6.42 darkcity.gna.ch Linux 2.5 (sometimes 2.4) (4) Received: from ([195.226.6.42:45075] helo=darkcity.gna.ch) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 01/B0-47588-0BA69744 for ; Sun, 28 May 2006 05:17:37 -0400 Received: from localhost (localhost [127.0.0.1]) by darkcity.gna.ch (Postfix) with ESMTP id 82CD9A6250 for ; Sun, 28 May 2006 10:25:22 +0200 (CEST) Received: from unknown by localhost (amavisd-new, unix socket) id client-XX4pBAkG for ; Sun, 28 May 2006 10:25:21 +0200 (CEST) Received: from [192.168.1.42] (217-162-171-242.dclient.hispeed.ch [217.162.171.242]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTP id 9C210A6175 for ; Sun, 28 May 2006 10:25:21 +0200 (CEST) Message-ID: <44795E5A.2010902@cschneid.com> Date: Sun, 28 May 2006 10:24:58 +0200 User-Agent: Thunderbird 1.5.0.2 (Macintosh/20060308) MIME-Version: 1.0 To: internals@lists.php.net References: <138663365.20060514205903@marcus-boerger.de> <038d01c676f8$ab9b3380$6602a8c0@foxbox> <44685D24.2000801@php.net> <1147708994.14148.23.camel@notebook.local> <16710545416.20060515202714@marcus-boerger.de> <1147721541.14148.47.camel@notebook.local> <4468DB43.1020005@emini.dk> <7.0.1.0.2.20060515194051.02b32ef8@zend.com> <1148496966.19173.79.camel@notebook.local> <4410698096.20060528000340@marcus-boerger.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at gna.ch Subject: Re: [PHP-DEV] fatal static call in php 6.0? From: cschneid@cschneid.com (Christian Schneider) Stanislav Malyshev wrote: > That's not about some abstract design principles - it's just a bug in OO > implementation, static call should not leave $this from previous context > dangling. Of course it's unlpleasant to find your code to rely on buggy While that might be true it does not mean that we have to force a 100% separation between static and non-static methods. It would be very PHP-like to allow class URL { function get($url = null) { if (!isset($url)) $url = $this->url; ... } } which could throw an error if $this is used when called statically but still allows the polymorphism of $url->get(); and URL::get("php.net"); which can be very handy in utility classes/functions. While this is not the most crucial of all concepts I still think it is closer to the strength, dynamicity and opiniatedness of PHP than enforcing the keyword static and introducing sort of a strong typing through the backdoor. My $.02, - Chris, follower of the minimalistic-OO school