Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40683 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55236 invoked from network); 25 Sep 2008 14:08:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Sep 2008 14:08:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 88.198.8.16 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 88.198.8.16 bigtime.backendmedia.com Linux 2.6 Received: from [88.198.8.16] ([88.198.8.16:40907] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 84/51-46875-46B9BD84 for ; Thu, 25 Sep 2008 10:08:36 -0400 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id 92DD91EBC01B; Thu, 25 Sep 2008 14:08:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at backendmedia.com Received: from bigtime.backendmedia.com ([127.0.0.1]) by localhost (bigtime.backendmedia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7I1csORGgX3z; Thu, 25 Sep 2008 16:08:48 +0200 (CEST) Received: from [192.168.84.16] (office-zh.liip.ch [91.192.102.250]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mls@pooteeweet.org) by bigtime.backendmedia.com (Postfix) with ESMTP id 345321EBC019; Thu, 25 Sep 2008 16:08:48 +0200 (CEST) Cc: internals@lists.php.net Message-ID: To: Larry Garfield In-Reply-To: <200809222239.07319.larry@garfieldtech.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Thu, 25 Sep 2008 16:08:27 +0200 References: <48D7F5EF.3090202@zend.com> <200809222239.07319.larry@garfieldtech.com> X-Mailer: Apple Mail (2.929.2) Subject: Re: [PHP-DEV] namespace issues From: mls@pooteeweet.org (Lukas Kahwe Smith) On 23.09.2008, at 05:39, Larry Garfield wrote: > "Most of the functionality could be easily achieved using static class > methods". > > As someone who uses both functions and classes with equal comfort, I > have to > say "GAH, NO NO NO!" to that statement. Classes as pseudo- > namespaces are > fundamentally wrong. Conceptually they're entirely different > things. I have > to shut people down every time they try to suggest that in Drupal. > > It's not just a conceptual issue, either. For a very practical > example, > consider that a namespaces can be split across any number of files. > A class > must be all in one file. That means if you want to group functions > together, > they MUST all be in one single monolithic file. That makes them, > sorry, > useless for anything even remotely interesting. > > No, namespaces for functions can most certainly *not* be emulated > with either > variable functions or static methods. Dropping namespace support for > functions makes namespaces mostly useless for anyone who is not 100% > OOP. > There's no reason to make functions second-class citizens (no pun > intended). sure point taken on the monolithic files, when sticking different functions into classes just for the sake of them then becoming namespaceable. but how would allowing functions in namespaces solve this issue? regards, Lukas Kahwe Smith mls@pooteeweet.org