Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38636 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63491 invoked from network); 26 Jun 2008 10:41:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jun 2008 10:41:30 -0000 Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=rquadling@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 72.14.220.156 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 72.14.220.156 fg-out-1718.google.com Received: from [72.14.220.156] ([72.14.220.156:29037] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9C/E8-13482-A5273684 for ; Thu, 26 Jun 2008 06:41:30 -0400 Received: by fg-out-1718.google.com with SMTP id 16so1818602fgg.23 for ; Thu, 26 Jun 2008 03:41:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :to:subject:cc:in-reply-to:mime-version:content-type:references; bh=BAMoKHowR1SnmWvWbdIuLGrzWi0sbnDbp+4UUK/IeSc=; b=t3tM9aqSZ2Yz48kUaaBhkCLjYOd/HJvXNmHLON+PuLd3zeaMK28xOUftbRbK/FXZfn smRNzFHLOiUMjKlDjVy0aICht3GbMEnKJn3g4EFO8XKauwRXNrnud69gRg941lZlngK5 IAtofTYNzts82ujatOGOWTaBqmf3srB9eaEGY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to :mime-version:content-type:references; b=J6xRQ68cagfXC6Rsl7sKOPl7RXZCT+ICWONjLWMDEXo5uWj41rT2zYc1NV7xUL/mrf cLpwEZAPH1z22RUcrIlzozWqtSy36U8gE1kZleq2bhVN0rNbt4e3qD1McOgfe5TPGJRA r10wj18Qt9lxT6ggFLKmJNdvXlRIOOdSY6yWo= Received: by 10.86.59.18 with SMTP id h18mr12016507fga.67.1214476887216; Thu, 26 Jun 2008 03:41:27 -0700 (PDT) Received: by 10.86.97.3 with HTTP; Thu, 26 Jun 2008 03:41:27 -0700 (PDT) Message-ID: <10845a340806260341y70a3ca12v5c339e697863ca01@mail.gmail.com> Date: Thu, 26 Jun 2008 11:41:27 +0100 Reply-To: RQuadling@GoogleMail.com To: "Hartmut Holzgraefe" Cc: "Derick Rethans" , "Rasmus Lerdorf" , "internals Mailing List" In-Reply-To: <48635E85.3040401@mysql.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5376_23969257.1214476887237" References: <10845a340806260209g5d22c986tbd14b4234d079590@mail.gmail.com> <48635E85.3040401@mysql.com> Subject: Re: [PHP-DEV] How bad would it be to say/enforce that namespacing can only apply to classes and not normal functions? From: rquadling@googlemail.com ("Richard Quadling") ------=_Part_5376_23969257.1214476887237 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline 2008/6/26 Hartmut Holzgraefe : > Richard Quadling wrote: > > How bad would it be to say that namespacing can only apply to classes and >> not normal functions? >> > > i don't see namespacing as an OO only feature, IMHO it is a perfectly > valid and useful thing for pure procedural code, too > > not having namespacing for procedural functions would leave > the old ugly concept of bundling functions as static methods within > dummy wrapper classes as only option for procedural name space > emulation ... which AFAIR was one of the things we wanted to get > rid of way back when the whole namespace idea first materialized? > > Ok. I see your point and the idea of grouping related functionality into a dummy class full of statics does feel wrong when there is no other benefit, but from a userland code's perspective namespace::function() looks JUST like ugly_bundled_class::static() Internally, sure, they are completely different, but from a users perspective, they are the same thing. Same amount of typing. Same syntax. Nothing to differentiate. So the issue to namespace::function() vs class::static() remains. As I see it either precedence is the answer (user namespaces first, internal namespaces next and global namespace being last) or a different symbol for namespace. Maybe namespace:::function() vs class::static(). Would that be enough? Richard. -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!" ------=_Part_5376_23969257.1214476887237--