Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35593 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9500 invoked by uid 1010); 19 Feb 2008 14:29:34 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 9485 invoked from network); 19 Feb 2008 14:29:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2008 14:29:34 -0000 Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:53280] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 25/E5-55225-CC7EAB74 for ; Tue, 19 Feb 2008 09:29:34 -0500 Received: from MBOERGER-ZRH (unknown [193.142.125.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id 0DF2C1B3671; Tue, 19 Feb 2008 15:29:30 +0100 (CET) Date: Tue, 19 Feb 2008 15:29:30 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <3710533306.20080219152930@marcus-boerger.de> To: Rasmus Lerdorf CC: Larry Garfield , internals@lists.php.net In-Reply-To: <47BA34AB.6010408@lerdorf.com> References: <001c01c87264$3c01b4e0$b4051ea0$@de> <58510.98.193.37.55.1203374232.squirrel@www.l-i-e.com> <200802181936.17739.larry@garfieldtech.com> <47BA34AB.6010408@lerdorf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: Traits for PHP From: helly@php.net (Marcus Boerger) Hello Rasmus, Tuesday, February 19, 2008, 2:45:15 AM, you wrote: > Larry Garfield wrote: >> You also note that this mechanism has no runtime impact. That's unfortunate, >> because I'd find the ability to add methods to an object at runtime >> conditionally based on some other value far more useful in my work. :-) >> Especially since, as above, there seems to be a way to implement this >> functionality now as-is with a little more typing, yet runtime modification >> is still impossible without eval() and similar scary stuff. > The idea here is that we want to be able to cache opcodes, classes and > functions and optimize them out of the runtime context so the executor > can skip creating classes and functions on every single request. A lot > of the traffic on this list over the past couple of months seems to > ignore this basic premise. Features such as autoload and runtime object > manipulation incur a huge performance hit in the sense that they change > something that was free before and not only add the cost of the feature > itself, but it also means the object in question now can no longer be > cached and has to be created on every single request. > This doesn't mean we can't consider such features, but people need to > also consider the performance implications. For that reason allowing traits in favor of include inside a class body is much better. Best regards, Marcus