Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58109 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95871 invoked from network); 27 Feb 2012 02:03:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2012 02:03:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=cpriest@zerocue.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cpriest@zerocue.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zerocue.com designates 74.115.204.41 as permitted sender) X-PHP-List-Original-Sender: cpriest@zerocue.com X-Host-Fingerprint: 74.115.204.41 relay-hub205.domainlocalhost.com Received: from [74.115.204.41] ([74.115.204.41:51862] helo=relay-hub205.domainlocalhost.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3D/79-40985-274EA4F4 for ; Sun, 26 Feb 2012 21:03:32 -0500 Received: from MBX201.domain.local ([169.254.1.244]) by HUB205.domain.local ([192.168.69.5]) with mapi id 14.01.0355.002; Sun, 26 Feb 2012 21:03:27 -0500 To: Kris Craig , John Crenshaw CC: Arvids Godjuks , "internals@lists.php.net" Thread-Topic: [PHP-DEV] [RFC] Enum proposal (yet another) Thread-Index: AQHM8R0dUY0PH9uqhUOfc9WMVqQiOQAec7wwlknt8ACAAEOrAIAADRQAgAHBzQCAAAYJAIABby4AgAAMUoCAAB6KAIAAFZaAgAAKMICAABHoAIAAJREAgAAeKgCAASvAgIAABPqAgAAFxwCAABSngIAAAQaA//+wd0A= Date: Mon, 27 Feb 2012 02:03:26 +0000 Message-ID: <9570D903A3BECE4092E924C2985CE4854FC3C828@MBX201.domain.local> References: <4F455C96.50706@gmail.com> <4F455E91.2060408@alliantinternet.com> <028001ccf1ab$0b200050$216000f0$@alliantinternet.com> <4F457517.7050901@alliantinternet.com> <028d01ccf230$91d79b00$b586d100$@alliantinternet.com> <4F4686C6.2040207@sugarcrm.com> <4F496818.8000405@sugarcrm.com> <4F4982BF.8090102@sugarcrm.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.64.23] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: RE: [PHP-DEV] [RFC] Enum proposal (yet another) From: cpriest@zerocue.com (Clint M Priest) +1 for that as well. -----Original Message----- From: Kris Craig [mailto:kris.craig@gmail.com]=20 Sent: Sunday, February 26, 2012 7:48 PM To: John Crenshaw Cc: Arvids Godjuks; internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] Enum proposal (yet another) Well said, John! I think that's a terrific idea! --Kris On Sun, Feb 26, 2012 at 5:44 PM, John Crenshaw wr= ote: > > From: Kris Craig [mailto:kris.craig@gmail.com] > > > > I actually agree as well. Looking back in the thread, I think my=20 > > overly broad use of the word "strict" might have led to some=20 > > confusion over what I'm advocating. > > Honestly, this is the biggest problem that the typing debates have had. > Someone advocates "strict typing" when they really mean "weak typing"=20 > (as opposed to the current "dynamic typing") but there's always a=20 > group of people that assume they mean "strict strict strict typing=20 > like the old C days". People then panic and get frustrated because the=20 > plethora of problems with adding this level of restriction to PHP have=20 > already been discussed extensively. Discussion then devolves into=20 > denigration and then finally disintegrates completely. > > If we can agree on some basic terminology I think it would move things=20 > forward considerably. I propose these terms: > - "Strict Typing" means the super strict old C style typing that has=20 > been proven to be ridiculous in this environment because of the=20 > obvious problems inherent in the fact that almost every input is a string= . > - "Weak Typing" means types in the same sense that the PHP=20 > documentation uses types (for example, the docs indicate=20 > substr(string, integer), and substr(12345, "2") =3D=3D "345".) > - "No Scalar Typing" should be used to indicate the current system=20 > (where there is no provision for hinting at scalar types.) > > In addition, if someone potentially new expresses support for "Strict=20 > Typing", let's assume that they really mean weak typing unless proven=20 > otherwise (this is by far the more likely intent.) Politely clarify=20 > terminology so that everyone can be on the same page. If someone still=20 > insists that they want "Strict Typing", point them to the prior=20 > discussions on the topic which explain exactly what the problems with thi= s are. > > It might be wise to maintain a wiki article to keep track of the 3=20 > different levels of typing, as well as a summary of the typical=20 > arguments pro and con for each of the 3. If people agree that this=20 > would be helpful, I'm willing to dig through the archives and try to put = this together. > > John Crenshaw > Priacta, Inc. >