Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58268 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42677 invoked from network); 28 Feb 2012 20:00:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Feb 2012 20:00:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmgx.michael@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmgx.michael@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.170 as permitted sender) X-PHP-List-Original-Sender: dmgx.michael@gmail.com X-Host-Fingerprint: 209.85.212.170 mail-wi0-f170.google.com Received: from [209.85.212.170] ([209.85.212.170:47472] helo=mail-wi0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3E/01-36673-B523D4F4 for ; Tue, 28 Feb 2012 15:00:28 -0500 Received: by wibhj13 with SMTP id hj13so160198wib.29 for ; Tue, 28 Feb 2012 12:00:25 -0800 (PST) Received-SPF: pass (google.com: domain of dmgx.michael@gmail.com designates 10.180.8.164 as permitted sender) client-ip=10.180.8.164; Authentication-Results: mr.google.com; spf=pass (google.com: domain of dmgx.michael@gmail.com designates 10.180.8.164 as permitted sender) smtp.mail=dmgx.michael@gmail.com; dkim=pass header.i=dmgx.michael@gmail.com Received: from mr.google.com ([10.180.8.164]) by 10.180.8.164 with SMTP id s4mr42010832wia.6.1330459225118 (num_hops = 1); Tue, 28 Feb 2012 12:00:25 -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:content-transfer-encoding; bh=sA81k9G77tlKUfA1yH22Le9EK6lxcnI2r9W7+JRCEu8=; b=K6nYa3dFhiCx6SVdt0mZfhtb3aMDBBg1MKQKexJTmfG1gZq0DZyDRuLGKROlTRKp/2 Segzgf+VQyvFLp/jE9hjpZFugFdSyZbsJrYH/TIGiTusreqqXgN0r2aPUfDbDbgrigrt Ylmz8p7atlXXZIezhHKxf3RYosOc9FY3Thg9s= MIME-Version: 1.0 Received: by 10.180.8.164 with SMTP id s4mr33330201wia.6.1330459225058; Tue, 28 Feb 2012 12:00:25 -0800 (PST) Received: by 10.216.30.149 with HTTP; Tue, 28 Feb 2012 12:00:24 -0800 (PST) In-Reply-To: References: <1330357150.2159.30.camel@guybrush> <4F4C1324.2040905@gmail.com> Date: Tue, 28 Feb 2012 15:00:24 -0500 Message-ID: To: "internals@lists.php.net" Cc: Lazare Inepologlou , Arvids Godjuks Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Scalar type hinting From: dmgx.michael@gmail.com (Michael Morris) Thank you. Now I'm going to go work up a detailed RFC for what I posted earlier with some additional clarification as to when errors should and shouldn't be thrown. On Tue, Feb 28, 2012 at 2:53 PM, John Crenshaw w= rote: > OK everyone, it seems that some people have forgotten or missed the origi= nal agreement that this thread started with. There is a communication disco= nnect ("strict typing" means horribly different things to different people = right now). Please read through and understand the following terminology be= fore continuing to post on this thread. We've agreed to the following terms= : > > - "Strict Typing" means the super strict old C style typing *with no impl= icit conversions*. (If you really think this is what you want, you are prob= ably mistaken. Look through prior discussions on this topic. This fails for= numerous reasons, including the fact that almost every input to PHP is a s= tring.) > - "Weak Typing" means types in the same sense that the PHP documentation = uses types (for example, the docs indicate substr(string, integer), and sub= str(12345, "2") =3D=3D "345".) (If you think you want "strict typing", this= is probably what you mean.) > - "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 Typ= ing", please assume that they really mean weak typing unless proven otherwi= se (this is by far the more likely intent.) Don't get mean, politely clarif= y terminology so that everyone can be on the same page. If someone still in= sists that they want "Strict Typing" (as defined above), point them to the = prior discussions on the topic which explain exactly what the problems with= this are. > > John Crenshaw > Priacta, Inc.