Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58288 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72362 invoked from network); 28 Feb 2012 21:58:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Feb 2012 21:58:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.42 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 209.85.212.42 mail-vw0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:44921] helo=mail-vw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/67-36673-20E4D4F4 for ; Tue, 28 Feb 2012 16:58:28 -0500 Received: by vbjk13 with SMTP id k13so2380900vbj.29 for ; Tue, 28 Feb 2012 13:58:24 -0800 (PST) Received-SPF: pass (google.com: domain of kris.craig@gmail.com designates 10.52.93.77 as permitted sender) client-ip=10.52.93.77; Authentication-Results: mr.google.com; spf=pass (google.com: domain of kris.craig@gmail.com designates 10.52.93.77 as permitted sender) smtp.mail=kris.craig@gmail.com; dkim=pass header.i=kris.craig@gmail.com Received: from mr.google.com ([10.52.93.77]) by 10.52.93.77 with SMTP id cs13mr15085023vdb.71.1330466304206 (num_hops = 1); Tue, 28 Feb 2012 13:58:24 -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=dDX9AZ8AmNTf/yF/KXuw3wszFc43akJ5ALlMX1zK9+A=; b=vtYtVcGEjpZBMGLWZC9N3qvFZnms4U89gCzL2etLX3/UTbTzcv8b8Thd1QHo7FvBfN 4fRZa6UOEQEsn0DYBAnfkfp8yoZzoS15qtnygG7GbWlp+htMQPNVP0jJySdwLs5pmFSY p27QGr5/Drvexw+oK32izGbrQllooRQW6JWAs= MIME-Version: 1.0 Received: by 10.52.93.77 with SMTP id cs13mr12487702vdb.71.1330466304034; Tue, 28 Feb 2012 13:58:24 -0800 (PST) Received: by 10.52.91.5 with HTTP; Tue, 28 Feb 2012 13:58:23 -0800 (PST) In-Reply-To: References: <1330357150.2159.30.camel@guybrush> <693e15008681dfe7372eaea66214f8a8.squirrel@www.l-i-e.com> Date: Tue, 28 Feb 2012 13:58:23 -0800 Message-ID: To: John Crenshaw Cc: Richard Lynch , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=bcaec501652f70068004ba0d530d Subject: Re: [PHP-DEV] Scalar type hinting From: kris.craig@gmail.com (Kris Craig) --bcaec501652f70068004ba0d530d Content-Type: text/plain; charset=ISO-8859-1 Err sorry yes John is correct. I wasn't paying close enough attention. Here's *my* vision of how that progression would look: $a = "1"; // Current kosher unchanged. weak int $a = "1"; // Converts to 1. No error thrown. strong int $a = "1"; // Converts to 1. May or may not throw an error (I'm still on the fence). $a = "blah"; // Current kosher unchanged. weak int $a = "blah"; // Throws E_x error level. strong int $a = "blah"; // Throws E_y error level. Where E_y > E_x. --Kris On Tue, Feb 28, 2012 at 1:52 PM, John Crenshaw wrote: > No, In the example given there's an error on int $a = "1". There should be > no error because this juggles fine. > > John Crenshaw > Priacta, inc. > > -----Original Message----- > From: Kris Craig [mailto:kris.craig@gmail.com] > Sent: Tuesday, February 28, 2012 4:47 PM > To: Richard Lynch > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] Scalar type hinting > > @Richard That's fairly close to what I'm thinking, yes. But there seems > to be a diverse range of ideas bouncing around right now, so at present > it's all in flux. > > --Kris > > > On Tue, Feb 28, 2012 at 1:44 PM, Richard Lynch wrote: > > > On Mon, February 27, 2012 4:34 pm, Kris Craig wrote: > > > I think this is the main reason for differentiating between "strong" > > > (or > > > whatever word is appropriate) and "weak." The developer may very > > > well want their script to blow-up in such a case. > > > > I believe I actually "get it" now... > > > > You want 3 layers: > > > > $a = "1"; //current kosher unchanged > > weak int $a = "1"; // some E_x error level strong int $a = "1"; // > > some E_y error level where E_y > E_x > > > > Is that a correct summation? > > > > -- > > brain cancer update: > > http://richardlynch.blogspot.com/search/label/brain%20tumor > > Donate: > > > > https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=F > > S9NLTNEEKWBE > > > > > > > > -- > > PHP Internals - PHP Runtime Development Mailing List To unsubscribe, > > visit: http://www.php.net/unsub.php > > > > > --bcaec501652f70068004ba0d530d--