Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37006 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79139 invoked from network); 14 Apr 2008 17:49:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Apr 2008 17:49:52 -0000 Authentication-Results: pb1.pair.com header.from=cschneid@cschneid.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=cschneid@cschneid.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cschneid.com from 195.226.6.51 cause and error) X-PHP-List-Original-Sender: cschneid@cschneid.com X-Host-Fingerprint: 195.226.6.51 darkcity.gna.ch Linux 2.6 Received: from [195.226.6.51] ([195.226.6.51:40700] helo=mail.gna.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4F/7D-11147-E3993084 for ; Mon, 14 Apr 2008 13:49:51 -0400 Received: from localhost (localhost [127.0.0.1]) by darkcity.gna.ch (Postfix) with ESMTP id F017216FCE5; Mon, 14 Apr 2008 19:49:47 +0200 (CEST) Received: from unknown by localhost (amavisd-new, unix socket) id client-XXfEOLuC; Mon, 14 Apr 2008 19:49:37 +0200 (CEST) Received: from [192.168.1.47] (84-72-92-81.dclient.hispeed.ch [84.72.92.81]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTP id 2378516FCED; Mon, 14 Apr 2008 19:49:37 +0200 (CEST) Cc: PHP Developers Mailing List Message-ID: <7356DD7D-2501-49CB-9428-758DCF674691@cschneid.com> To: Chris Stockton 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 v919.2) Date: Mon, 14 Apr 2008 19:49:35 +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> X-Mailer: Apple Mail (2.919.2) X-Virus-Scanned: amavisd-new at gna.ch Subject: Re: [PHP-DEV] Return type hints From: cschneid@cschneid.com (Christian Schneider) 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. > consistently or be liberal consistently. Or, keep php, php. I could > care less as long as things are Keeping PHP close to the original principles of KISS and "make common things easy" is also a goal of mine. - Chris