Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63605 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31417 invoked from network); 22 Oct 2012 23:32:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Oct 2012 23:32:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:36524] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3F/E4-06090-D87D5805 for ; Mon, 22 Oct 2012 19:32:30 -0400 Received: from [192.168.2.230] (ppp-93-104-20-151.dynamic.mnet-online.de [93.104.20.151]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 3FE6865551; Tue, 23 Oct 2012 01:32:26 +0200 (CEST) To: Christian Schneider Cc: Anthony Ferrara , internals@lists.php.net In-Reply-To: <00E072ED-AA8D-4B91-8052-803F1FE73FF9@cschneid.com> References: <712F4499-949C-4C6F-A142-736A1B156189@gmail.com> <5084281C.9020507@sugarcrm.com> <00E072ED-AA8D-4B91-8052-803F1FE73FF9@cschneid.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 23 Oct 2012 01:32:33 +0200 Message-ID: <1350948753.2361.508.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Generics proposal From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Tue, 2012-10-23 at 00:57 +0200, Christian Schneider wrote: > > Basically it means that you type more (redundant) stuff to allow the > compiler to check some errors. Which we can't do due to PHP's dynamic nature. For the engine to take benefit from it we'd have to change the language. All we do,when implementing such a feature is adding a default way so IDEs and other tools can do their checks and to enforce specific runtime(!) errors (while in effect all it does is swap one kind of error (fatal error, not existing function) for another (so called "catchable" error, wrong type)) at the cost of making some operations, at least function calls, more expensive (more things to check at runtime - has a small impact even when not used ... and that while our fcalls are already relatively expensive ...) johannes