Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58393 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89589 invoked from network); 1 Mar 2012 08:52:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Mar 2012 08:52:28 -0000 Authentication-Results: pb1.pair.com header.from=simonsimcity@googlemail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=simonsimcity@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: simonsimcity@googlemail.com X-Host-Fingerprint: 209.85.214.170 mail-tul01m020-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:56457] helo=mail-tul01m020-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 08/BC-46815-BC83F4F4 for ; Thu, 01 Mar 2012 03:52:27 -0500 Received: by obbwd1 with SMTP id wd1so448132obb.29 for ; Thu, 01 Mar 2012 00:52:25 -0800 (PST) Received-SPF: pass (google.com: domain of simonsimcity@googlemail.com designates 10.60.26.166 as permitted sender) client-ip=10.60.26.166; Authentication-Results: mr.google.com; spf=pass (google.com: domain of simonsimcity@googlemail.com designates 10.60.26.166 as permitted sender) smtp.mail=simonsimcity@googlemail.com; dkim=pass header.i=simonsimcity@googlemail.com Received: from mr.google.com ([10.60.26.166]) by 10.60.26.166 with SMTP id m6mr1480010oeg.45.1330591945575 (num_hops = 1); Thu, 01 Mar 2012 00:52:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=iDN+x2S5+QKjQedO5TYTEw9FUoJFtVcqKMj/6aet1zw=; b=KmksV7wEPA8YhRrTyQtTo3UqE56rVYDO27k8jEtO1QOFiYozgIt6Jvle7OaGxJm/iJ a92UV0L7jATTDYvhNBpW+YfHGs3X2GccsveYzc/3F4v5shp40oyumhYHtKZkOkpsFYj0 S7FKLmyUtVgMg6SnPxn/abWBXQzuAjsI9lhrY= MIME-Version: 1.0 Received: by 10.60.26.166 with SMTP id m6mr1280275oeg.45.1330591945470; Thu, 01 Mar 2012 00:52:25 -0800 (PST) Received: by 10.60.7.229 with HTTP; Thu, 1 Mar 2012 00:52:25 -0800 (PST) In-Reply-To: References: <693e15008681dfe7372eaea66214f8a8.squirrel@www.l-i-e.com> <4F4D5D44.5090307@developersdesk.com> Date: Thu, 1 Mar 2012 09:52:25 +0100 Message-ID: To: John Crenshaw Cc: Richard Lynch , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=e89a8fb2060440349704ba2a94f8 Subject: Re: [PHP-DEV] PHP Philosophy (was RE: [PHP-DEV] Scalar type hinting) From: simonsimcity@googlemail.com (Simon Schick) --e89a8fb2060440349704ba2a94f8 Content-Type: text/plain; charset=UTF-8 Hi, John Just to add an idea to yours .. Do you think it's a compatibility-break if we'd decide to send a E_NOTICE or E_WARNING if we f.e. try to give a string to a method that just allows integer for this argument? No break at all, just a E_NOTICE or E_WARNING as the script can succeed anyways. Bye Simon 2012/3/1 John Crenshaw > > From: Richard Lynch [mailto:ceo@l-i-e.com] > > On Wed, February 29, 2012 7:16 pm, John Crenshaw wrote: > > > I'm beginning to think that the type hinting question is too closely > > > related to the dirty secrets of type juggling to resolve them > > > separately. You may have to either discard consistency, or else fix > > > the problem of silent bizarre conversions at the same time ('foo'==0, > > > '123abc'=123). Fixing the conversions is a BC break though. > > > > [short version] > > One man's "fixing" is another man's "feature" :-) > > > > Old hands can now hit delete while I wax philosophical. > > The operative word was "silent". The actual behavior is fine, but the > silence is unexpected. For example, PHP happily accepts substr('foo', > 'bar') with no complaint at all. From a purely philosophical perspective I > think almost 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 > anything about the conversion behavior. (I'm not seeing a way to do this > one, unless we redefine "consistent".) > > John Crenshaw > Priacta, Inc. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --e89a8fb2060440349704ba2a94f8--