Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58391 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86626 invoked from network); 1 Mar 2012 08:47:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Mar 2012 08:47:04 -0000 Authentication-Results: pb1.pair.com header.from=johncrenshaw@priacta.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=johncrenshaw@priacta.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain priacta.com designates 64.95.72.244 as permitted sender) X-PHP-List-Original-Sender: johncrenshaw@priacta.com X-Host-Fingerprint: 64.95.72.244 mxout.myoutlookonline.com Received: from [64.95.72.244] ([64.95.72.244:34967] helo=mxout.myoutlookonline.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 50/0C-46815-8873F4F4 for ; Thu, 01 Mar 2012 03:47:04 -0500 Received: from mxout.myoutlookonline.com (localhost [127.0.0.1]) by mxout.myoutlookonline.com (Postfix) with ESMTP id EF0A88BEA2B; Thu, 1 Mar 2012 03:47:01 -0500 (EST) X-Virus-Scanned: by SpamTitan at mail.lan Received: from HUB023.mail.lan (unknown [10.110.2.1]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mxout.myoutlookonline.com (Postfix) with ESMTPS id A43518BE9F7; Thu, 1 Mar 2012 03:47:01 -0500 (EST) Received: from MAILR001.mail.lan ([10.110.18.27]) by HUB023.mail.lan ([10.110.17.23]) with mapi; Thu, 1 Mar 2012 03:46:57 -0500 To: Richard Lynch , "internals@lists.php.net" Date: Thu, 1 Mar 2012 03:46:56 -0500 Thread-Topic: [PHP-DEV] PHP Philosophy (was RE: [PHP-DEV] Scalar type hinting) Thread-Index: Acz3V8U4zEj/GuJ6RMiPBSsiyn/G5AALvjdQ Message-ID: References: <693e15008681dfe7372eaea66214f8a8.squirrel@www.l-i-e.com> <4F4D5D44.5090307@developersdesk.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: RE: [PHP-DEV] PHP Philosophy (was RE: [PHP-DEV] Scalar type hinting) From: johncrenshaw@priacta.com (John Crenshaw) > From: Richard Lynch [mailto:ceo@l-i-e.com]=20 > On Wed, February 29, 2012 7:16 pm, John Crenshaw wrote: > > I'm beginning to think that the type hinting question is too closely=20 > > related to the dirty secrets of type juggling to resolve them=20 > > separately. You may have to either discard consistency, or else fix=20 > > the problem of silent bizarre conversions at the same time ('foo'=3D=3D= 0,=20 > > '123abc'=3D123). Fixing the conversions is a BC break though. >=20 > [short version] > One man's "fixing" is another man's "feature" :-) >=20 > Old hands can now hit delete while I wax philosophical. The operative word was "silent". The actual behavior is fine, but the silen= ce is unexpected. For example, PHP happily accepts substr('foo', 'bar') wit= h no complaint at all. From a purely philosophical perspective I think almo= st everyone would expect *at least* a strict notice. On a practical level, we have a major barrier and we'll have to decide how = to handle it. As I see it we could do one of the following: 1. Discard consistency (!!) 2. Try to convince people to make these bizarre conversions not silent (BC = break) 3. Try to find a creative solution to be consistent without changing anythi= ng about the conversion behavior. (I'm not seeing a way to do this one, unl= ess we redefine "consistent".) John Crenshaw Priacta, Inc.