Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35573 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60620 invoked by uid 1010); 19 Feb 2008 01:45:40 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 60605 invoked from network); 19 Feb 2008 01:45:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2008 01:45:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 204.11.219.139 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 204.11.219.139 mail.lerdorf.com Received: from [204.11.219.139] ([204.11.219.139:58442] helo=mail.lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 98/3C-23568-2C43AB74 for ; Mon, 18 Feb 2008 20:45:39 -0500 Received: from [192.168.200.117] (c-24-6-219-206.hsd1.ca.comcast.net [24.6.219.206]) (authenticated bits=0) by mail.lerdorf.com (8.14.2/8.14.2/Debian-3) with ESMTP id m1J1jGws027392 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 18 Feb 2008 17:45:22 -0800 Message-ID: <47BA34AB.6010408@lerdorf.com> Date: Mon, 18 Feb 2008 17:45:15 -0800 User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Larry Garfield CC: internals@lists.php.net References: <001c01c87264$3c01b4e0$b4051ea0$@de> <58510.98.193.37.55.1203374232.squirrel@www.l-i-e.com> <200802181936.17739.larry@garfieldtech.com> In-Reply-To: <200802181936.17739.larry@garfieldtech.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92.1/5873/Mon Feb 18 14:37:39 2008 on colo.lerdorf.com X-Virus-Status: Clean Subject: Re: [PHP-DEV] RFC: Traits for PHP From: rasmus@lerdorf.com (Rasmus Lerdorf) 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. -Rasmus