Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:8041 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76823 invoked by uid 1010); 22 Feb 2004 02:09:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 76789 invoked from network); 22 Feb 2004 02:09:50 -0000 Received: from unknown (HELO rwcrmhc11.comcast.net) (204.127.198.35) by pb1.pair.com with SMTP; 22 Feb 2004 02:09:50 -0000 Received: from cassie (pcp03051629pcs.huntsv01.al.comcast.net[68.62.208.88]) by comcast.net (rwcrmhc11) with SMTP id <2004022202094901300db5sge> (Authid: zhundiak); Sun, 22 Feb 2004 02:09:49 +0000 Content-Type: text/plain; charset="iso-8859-1" To: PHP Development Date: Sat, 21 Feb 2004 20:10:53 -0600 User-Agent: KMail/1.4.3 References: <1077090830.30573.1.camel@coogle.localdomain> In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID: <200402212010.53919.zhundiak@comcast.net> Subject: Re: [PHP-DEV] Re: Static weirdness.. From: zhundiak@comcast.net (Art Hundiak) On Friday 20 February 2004 20:23, Herr Witten wrote: > Well, calling a static method from an instance breaks down the logic. > If it is static, then the instance has absolutely no bearing when > calling it. Therefore, it logically makes sense to call only from the > class name. > > Moreover, making a distinction between the method calling syntax begins > to make the distinction between class objects and instance objects. I > have a class which deals directly with classes and their static methods > as if they are objects. This is a powerful notion that still needs more > support in the Zend engine. > > The call for static method should be: > > ClassName->method(); > > Herr Witten > > > C++ allows $a->bar() when bar() is a static method (yes, it is called > > in a static context there too). > > > > IMO, there should be no error, warning or notice here. Regardless of the final implementation, I think access to static methods = and=20 static class variables should be consistent. Currently, you cannot acces= s a=20 class variable via an object instance. And for what it's worth, I see no reason why static methods cannot be cal= led=20 from objects. Follow Java/C++ in this case.