Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44932 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35197 invoked from network); 10 Jul 2009 19:43:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jul 2009 19:43:08 -0000 Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; 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:44367] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 97/55-37812-BC9975A4 for ; Fri, 10 Jul 2009 15:43:08 -0400 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id 40E844144058; Fri, 10 Jul 2009 19:44:32 +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 SiaZkhUDVyhg; Fri, 10 Jul 2009 21:44:30 +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 65FCD414405B; Fri, 10 Jul 2009 21:44:30 +0200 (CEST) Cc: Lewis Wright , Alain Williams , "Ionut G. Stan" , internals@lists.php.net Message-ID: To: Stanislav Malyshev In-Reply-To: <4A57813C.8020502@zend.com> 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, 10 Jul 2009 21:43:01 +0200 References: <7.0.1.0.2.20090708224156.0ac5a438@zend.com> <312025EF-84D0-4411-A0A7-4F0379C3105F@pooteeweet.org> <22CAD497EA2F476DAECEF9302D0B087A@pc> <98b8086f0907091150r47e7a103jaa50fcf7d5b32186@mail.gmail.com> <4A568B33.9000501@gmail.com> <98b8086f0907091744w7ab598dckc427d0a9484664b2@mail.gmail.com> <20090710102302.GC20283@gerbil.thgnet.it> <4A571981.80900@gmail.com> <20090710110522.GD19636@mint.phcomp.co.uk> <4A57813C.8020502@zend.com> X-Mailer: Apple Mail (2.935.3) Subject: Re: [PHP-DEV] Type hinting - Request for Discussion From: mls@pooteeweet.org (Lukas Kahwe Smith) On 10.07.2009, at 19:58, Stanislav Malyshev wrote: > Hi! > >> right .. lets not forget the original goal (though it hasnt been >> perfectly defined) >> the idea was to move common validation code out of the function >> body to > > reduce code, increase readability and enable IDE's to be even > smarter. > > I think while intent is good (avoiding repetitive code) the strict > implementation would do exactly the opposite of what should be done > - it would move the repeated validation from library code to client > code. WHich would negatively influence both readability (in case you > do it right) and code robustness (in case you forget to do the > necessary checks). +1 ... this is one of the key points i tried to make in my RFC. regards, Lukas Kahwe Smith mls@pooteeweet.org