Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44682 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89363 invoked from network); 3 Jul 2009 13:35:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jul 2009 13:35:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 88.198.8.16 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 88.198.8.16 bigtime.backendmedia.com Linux 2.6 Received: from [88.198.8.16] ([88.198.8.16:45741] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0B/F3-27980-F190E4A4 for ; Fri, 03 Jul 2009 09:35:28 -0400 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id 2564E1EBC01F; Fri, 3 Jul 2009 13:36:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at backendmedia.com Received: from bigtime.backendmedia.com ([127.0.0.1]) by localhost (bigtime.backendmedia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id arT3pAuu4noy; Fri, 3 Jul 2009 15:36:12 +0200 (CEST) Received: from [192.168.0.151] (84-72-88-166.dclient.hispeed.ch [84.72.88.166]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mls@pooteeweet.org) by bigtime.backendmedia.com (Postfix) with ESMTP id E570F1EBC01D; Fri, 3 Jul 2009 15:36:10 +0200 (CEST) Cc: ilia@ilia.ws, PHP Internals , Derick Rethans , Stanislav Malyshev , Hannes Magnusson Message-ID: To: Paul Biggar In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Fri, 3 Jul 2009 15:35:20 +0200 References: X-Mailer: Apple Mail (2.935.3) Subject: Re: [PHP-DEV] Re: Flexible type hinting From: mls@pooteeweet.org (Lukas Kahwe Smith) On 03.07.2009, at 15:04, Paul Biggar wrote: > Hi Ilia, > > On Thu, Jul 2, 2009 at 3:35 AM, Paul Biggar > wrote: >> Thanks to Ilia for getting to ball rolling on scalar type hinting. >> I believe I have a solution that caters to each crowd, without being >> too complicated. > > My impression is that there only minor support for the "flexible" > approach, and that even then, everyone prefers strict checking by > default. So the ideal seems to be your patch, with the addition of > > function x ((int) $casted_parameter) { ... } hmm not sure that the consensus of a "weak" check would be an automatic cast. Actually that wouldnt be much of a check in that case. I think the other side is more asking for what Ilia already begun with "numeric" in the sense of a weak checker. After the check it could go ahead and cast too for all I care, but it shouldnt be the equivalent of a cast. But maybe you are not implying that and I am just getting confused by the syntax. regards, Lukas Kahwe Smith mls@pooteeweet.org