Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60247 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58100 invoked from network); 20 Apr 2012 23:17:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Apr 2012 23:17:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=neufeind@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=neufeind@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 91.184.32.3 as permitted sender) X-PHP-List-Original-Sender: neufeind@php.net X-Host-Fingerprint: 91.184.32.3 mail.speedpartner.de Linux 2.5 (sometimes 2.4) (4) Received: from [91.184.32.3] ([91.184.32.3:47755] helo=mail.speedpartner.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5A/3F-63732-E7EE19F4 for ; Fri, 20 Apr 2012 19:17:19 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.speedpartner.de (Postfix) with ESMTP id 24852B3CDE for ; Sat, 21 Apr 2012 01:17:15 +0200 (CEST) Received: from mail.speedpartner.de ([127.0.0.1]) by localhost (mail.speedpartner.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vKKtsm3dnTmf for ; Sat, 21 Apr 2012 01:17:15 +0200 (CEST) Received: from collab.speedpartner.de (collab.speedpartner.de [91.184.32.10]) by mail.speedpartner.de (Postfix) with ESMTP id 0F0F1B3C1F for ; Sat, 21 Apr 2012 01:17:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by collab.speedpartner.de (Postfix) with ESMTP id 9D76CCB603A for ; Sat, 21 Apr 2012 01:17:13 +0200 (CEST) X-Virus-Scanned: amavisd-new at collab.speedpartner.de Received: from collab.speedpartner.de ([127.0.0.1]) by localhost (collab.speedpartner.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z57zycjkXIUX for ; Sat, 21 Apr 2012 01:17:12 +0200 (CEST) Received: from [192.168.4.28] (ip-62-143-28-82.unitymediagroup.de [62.143.28.82]) by collab.speedpartner.de (Postfix) with ESMTPSA id 6CB86CB6039 for ; Sat, 21 Apr 2012 01:17:11 +0200 (CEST) Message-ID: <4F91EE62.8080400@php.net> Date: Sat, 21 Apr 2012 01:16:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Complete case-sensitivity in PHP From: neufeind@php.net (Stefan Neufeind) On 04/20/2012 08:48 PM, C.Koy wrote: > On 4/20/2012 8:57 PM, Kris Craig wrote: >> >> Turkish localization notwithstanding (I confess that I know absolutely * >> nothing* about that lol), one possible use-case could be if you're >> including an external library/framework that contains a function with the >> same name but different case. I'm not sure how likely that is, mind you, >> but I can see that as one potential benefit. Either way, I guess my >> point >> is that the arguments for/against this seem to parallel the arguments for >> Windows-style fso case-insensitivity vs. Unix-style fso case-sensitivity. > > Java, C#, Python, Ruby... are all case-sensitive. This is not a feature > to be (mis-)used so that one can have a function named myfunc() and > MyFunc() in the same code base. > Case-insensitive class/function/interface names is a confusion for > everyone with non-PHP development experience. There's not a modern OO > platform that defines an interface named 'IDispatch' and later allows it > to be referenced as 'idispatch' or 'iDispatch'. And PHP is becoming more > OO with every major release. > Overall, full case-sensitivity seems to be a natural step in PHP's > evolution. I also have the feeling that cleaner code with consistent case would be a benefit. While I admit we can't change that from one day to the other (as we couldn't with other changes) I think we might possibly add a special kind of "deprecation" where the non-matching case would still work but (if you activate those deprecation-warnings) would trigger warnings so you can clean up your code. Various projects that I work on take explicit care of the case when auto-creating classnames etc. - not because they must but because they want to be consistent. And that's the thing I like about it. Regards, Stefan