Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58108 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94188 invoked from network); 27 Feb 2012 01:48:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2012 01:48:07 -0000 Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.54 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 74.125.82.54 mail-ww0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:64654] helo=mail-ww0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/29-40985-4D0EA4F4 for ; Sun, 26 Feb 2012 20:48:04 -0500 Received: by wgbdq12 with SMTP id dq12so3370790wgb.11 for ; Sun, 26 Feb 2012 17:48:01 -0800 (PST) Received-SPF: pass (google.com: domain of kris.craig@gmail.com designates 10.180.24.166 as permitted sender) client-ip=10.180.24.166; Authentication-Results: mr.google.com; spf=pass (google.com: domain of kris.craig@gmail.com designates 10.180.24.166 as permitted sender) smtp.mail=kris.craig@gmail.com; dkim=pass header.i=kris.craig@gmail.com Received: from mr.google.com ([10.180.24.166]) by 10.180.24.166 with SMTP id v6mr14037473wif.10.1330307281493 (num_hops = 1); Sun, 26 Feb 2012 17:48:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=jOu3rqJQsfuyHz18WanQnjix4eya1jgBtupVGuaOlZg=; b=sVmFXpFpbU0KLWz4s5hb0GDdrSHHJ95JtifreruhzSAEWFJ05cO+Db1e2EfW3Db2/D Br2MT9W3lj+7Q/LqBXBbDsL5sWz5d9VfGCiy0chktBNxTl89cZiSDiwuSqALxQjVDAOY euL0seq0WZoIGm5ulyot+dmWx/dMwjA36ibQE= MIME-Version: 1.0 Received: by 10.180.24.166 with SMTP id v6mr11117940wif.10.1330307281359; Sun, 26 Feb 2012 17:48:01 -0800 (PST) Received: by 10.223.75.146 with HTTP; Sun, 26 Feb 2012 17:48:01 -0800 (PST) In-Reply-To: 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> Date: Sun, 26 Feb 2012 17:48:01 -0800 Message-ID: To: John Crenshaw Cc: Arvids Godjuks , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=f46d04182610f2933304b9e84c8f Subject: Re: [PHP-DEV] [RFC] Enum proposal (yet another) From: kris.craig@gmail.com (Kris Craig) --f46d04182610f2933304b9e84c8f Content-Type: text/plain; charset=ISO-8859-1 Well said, John! I think that's a terrific idea! --Kris On Sun, Feb 26, 2012 at 5:44 PM, John Crenshaw wrote: > > From: Kris Craig [mailto:kris.craig@gmail.com] > > > > I actually agree as well. Looking back in the thread, I think my overly > > broad use of the word "strict" might have led to some 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" (as > opposed to the current "dynamic typing") but there's always a group of > people that assume they mean "strict strict strict typing like the old C > days". People then panic and get frustrated because the plethora of > problems with adding this level of restriction to PHP have already been > discussed extensively. Discussion then devolves into denigration and then > finally disintegrates completely. > > If we can agree on some basic terminology I think it would move things > forward considerably. I propose these terms: > - "Strict Typing" means the super strict old C style typing that has been > proven to be ridiculous in this environment because of the obvious problems > inherent in the fact that almost every input is a string. > - "Weak Typing" means types in the same sense that the PHP documentation > uses types (for example, the docs indicate substr(string, integer), and > substr(12345, "2") == "345".) > - "No Scalar Typing" should be used to indicate the current system (where > there is no provision for hinting at scalar types.) > > In addition, if someone potentially new expresses support for "Strict > Typing", let's assume that they really mean weak typing unless proven > otherwise (this is by far the more likely intent.) Politely clarify > terminology so that everyone can be on the same page. If someone still > insists that they want "Strict Typing", point them to the prior discussions > on the topic which explain exactly what the problems with this are. > > It might be wise to maintain a wiki article to keep track of the 3 > different levels of typing, as well as a summary of the typical arguments > pro and con for each of the 3. If people agree that this would be helpful, > I'm willing to dig through the archives and try to put this together. > > John Crenshaw > Priacta, Inc. > --f46d04182610f2933304b9e84c8f--