Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41251 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68928 invoked from network); 18 Oct 2008 04:37:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Oct 2008 04:37:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=ron@Opus1.COM; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ron@Opus1.COM; sender-id=unknown Received-SPF: pass (pb1.pair.com: domain Opus1.COM designates 192.245.12.8 as permitted sender) X-PHP-List-Original-Sender: ron@Opus1.COM X-Host-Fingerprint: 192.245.12.8 Viola.Opus1.COM OpenVMS 7.2 (Multinet 4.3-4.4 stack) Received: from [192.245.12.8] ([192.245.12.8:4181] helo=Viola.Opus1.COM) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/6D-19022-1F769F84 for ; Sat, 18 Oct 2008 00:37:06 -0400 Received: from [192.168.1.2] ([76.105.139.54]) by Opus1.COM (PMDF V6.2-X27 #9830) with ESMTPSA id <01N0UI8FJP5492A5SN@Opus1.COM> for internals@lists.php.net; Fri, 17 Oct 2008 21:37:00 -0700 (MST) Date: Fri, 17 Oct 2008 21:36:58 -0700 In-reply-to: <48F86EB4.5080308@kraya.co.uk> To: nathan@kraya.co.uk Cc: internals@lists.php.net, steph@php.net Message-ID: <3E52781C-3CD6-4A44-86B7-2682EC25AEA3@opus1.com> MIME-version: 1.0 X-Mailer: Apple Mail (2.753.1) Content-type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-transfer-encoding: 7bit X-Gpgmail-State: !signed References: <48F86EB4.5080308@kraya.co.uk> Subject: Re: [PHP-DEV] UltraSimple Namespace Solution From: ron@Opus1.COM (Ronald Chmara) On Oct 17, 2008, at 3:53 AM, Nathan Rixham wrote: > > *A Simpler Solution* > Force userland / general naming conventions in PHP. > > # namespaces are always lowercase > # functions are always lowercase > # classes are always CamelCaps with initial uppercase letter enforced > > thus: > //this is always the function two in namespace one::step > one::step::two(); > //this is always the method two of class step in namespace one > one::Step::two(); > > thoughts, opinions, reasons why it wouldn't work? Assuming this is a real question: 1. PHP is heading towards broad i18n. How do you "uppercase" or "lowercase" written languages that don't have a concept of case? 2. PHP was designed for wide adoption, and the authors of libraries often used function and class cases that matched their library. So, PHP case smashes, to Handle the problem of pg_pconnect (all smashed), PG_pConnect (EXTENSION_argumentAction), Pg_Pconnect (first letter ucase), etc. etc. etc. Right now this all works. Changing it would break, well, darned near *everything*. 3. The vast majority of user operating systems (and filesystems) out there do *NOT*, I repeat, do *NOT* all handle case in the same way, a sane way. Windows boxes are still lugging around DOS/VMS legacy with UPPERCAS.$1 files, Macs have their own breed of jollies as well, and anything that autoloads (such as namespace code) needs to handle all of these. Assuming that this is "A Modest Proposal": 1. It needs to be more over the top to be funny to a broad, multi- lingual, global, audience. For example, you might have suggested that we add an include_instead () operator, so somebody who wants to use a function/method which is located in '/var/location1/file_class.inc', rather than the already loaded function/method in '/var/location2/file_functions.inc', can override an existing function/method, and for giggles, you might suggest that the operator have the power to override all internal functions, but just for local execution scope, spawning a new process/ thread for each invocation, so a blog post can have 30-80 thousand processes with different scopes.... to render a web page. Okay, I'm shutting up now. :) -Bop