Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63604 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26910 invoked from network); 22 Oct 2012 22:57:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Oct 2012 22:57:47 -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 Received: from [195.226.6.51] ([195.226.6.51:55147] helo=mail.gna.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 05/04-06090-86FC5805 for ; Mon, 22 Oct 2012 18:57:45 -0400 Received: from localhost (localhost [127.0.0.1]) by darkcity.gna.ch (Postfix) with ESMTP id E1CBA5E08CD; Tue, 23 Oct 2012 00:57:41 +0200 (CEST) X-Virus-Scanned: amavisd-new at gna.ch Received: from mail.gna.ch ([127.0.0.1]) by localhost (darkcity.gna.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TKAioAP0VHGc; Tue, 23 Oct 2012 00:57:30 +0200 (CEST) Received: from [10.0.1.8] (178-83-161-240.dynamic.hispeed.ch [178.83.161.240]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTPSA id 4D1115E07A1; Tue, 23 Oct 2012 00:57:30 +0200 (CEST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) In-Reply-To: Date: Tue, 23 Oct 2012 00:57:37 +0200 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <00E072ED-AA8D-4B91-8052-803F1FE73FF9@cschneid.com> References: <712F4499-949C-4C6F-A142-736A1B156189@gmail.com> <5084281C.9020507@sugarcrm.com> To: Anthony Ferrara X-Mailer: Apple Mail (2.1499) Subject: Re: [PHP-DEV] Generics proposal From: cschneid@cschneid.com (Christian Schneider) Am 22.10.2012 um 21:44 schrieb Anthony Ferrara : > This is not about turning PHP into Java. Can we get over that old = rhetoric > already? Instead of bashing proposals like this, can we discuss them, > instead of this hatred for all things strict? >=20 > With that aside, I have mixed feelings on this. =85 and while it might not be about turning PHP into Java it might still = be worthwhile to read a bit about experiences with Generics in Java: = http://www.artima.com/weblogs/viewpost.jsp?thread=3D299081 Basically it means that you type more (redundant) stuff to allow the = compiler to check some errors. And while type hints and PPP are along the same line I think the main = difference is that they put the burden on the declarations, not on the = users of an API. That said I'm not even using type hints of PPP and sometimes it would be = handy if internal functions would be less strict about their parameters = (e.g. debug_backtrace() not accepting two arguments in PHP < 5.4 and = return null in that case instead of silently ignoring the extra = parameter). - Chris