Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37008 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29499 invoked from network); 14 Apr 2008 21:22:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Apr 2008 21:22:19 -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 85.10.196.195 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 85.10.196.195 serveforce1.backendmedia.com Linux 2.6 Received: from [85.10.196.195] ([85.10.196.195:58830] helo=serveforce1.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B0/B0-23408-90BC3084 for ; Mon, 14 Apr 2008 17:22:18 -0400 Received: from [192.168.0.151] (77-57-23-243.dclient.hispeed.ch [77.57.23.243]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) by serveforce1.backendmedia.com (Postfix) with ESMTP id 0304E12241AA; Mon, 14 Apr 2008 23:22:15 +0200 (CEST) Cc: Chris Stockton , PHP Developers Mailing List Message-ID: <6A76B92D-3901-4A4E-975F-C7C0F36FD1D9@pooteeweet.org> To: Christian Schneider In-Reply-To: <7356DD7D-2501-49CB-9428-758DCF674691@cschneid.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Mon, 14 Apr 2008 23:21:45 +0200 References: <1207539695.5736.42.camel@pena> <8d7b8c130804062157j60871630r6c3b27c4d3245cb9@mail.gmail.com> <1207576676.5331.49.camel@felipe> <47FA507D.2070108@cschneid.com> <5CB53203-F3E5-46F2-89A8-F331B2CB9017@pooteeweet.org> <47FA60F8.7060702@zend.com> <37C655F0-D212-420C-9320-7953A69C5EDB@pooteeweet.org> <48036A0C.7070203@cschneid.com> <7356DD7D-2501-49CB-9428-758DCF674691@cschneid.com> X-Mailer: Apple Mail (2.919.2) X-backendmedia-com-MailScanner-Information: Please contact the ISP for more information X-backendmedia-com-MailScanner: Found to be clean X-backendmedia-com-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=0.134, required 6, AWL 0.03, RDNS_DYNAMIC 0.10) X-backendmedia-com-MailScanner-From: mls@pooteeweet.org X-Spam-Status: No Subject: Re: [PHP-DEV] Return type hints From: mls@pooteeweet.org (Lukas Kahwe Smith) On 14.04.2008, at 19:49, Christian Schneider wrote: > > Am 14.04.2008 um 19:04 schrieb Chris Stockton: >> You are missing the point, why be strict on return types, and >> liberal on parameters? Be strict > > Because IMHO a function can easily specify what it is returning but > should be flexible in what it accepts - that's what a good PHP API > is to me. > Asking for consistency just for the sake of consistency seems wrong > here. Especially when it sends out the message that function > parameters should be (over-)specified to exact types. Right .. this is so beautiful. So we get type hints for parameters, then someone starts implements a patch for return types (for consistency) and goes a bit further than what we already have and suddenly (for consistency) the parameter type hints need to be adjusted as well. Err .. what? Who is missing the point here? I think this illustrates the consistency arguments that are thrown around since recently quite well. Either it makes sense or does not make sense in its own right. Do not use consistency as an excuse to add things. Now we have had this debate, but I guess it ends up being a fairly non technical debate about who likes what and who wants PHP to change in what ways .. oh well .. I give up .. this debate is a horse that is so dead it can never die anyways. regards, Lukas