Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32099 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20894 invoked by uid 1010); 7 Sep 2007 19:07:23 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 20879 invoked from network); 7 Sep 2007 19:07:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Sep 2007 19:07:23 -0000 Authentication-Results: pb1.pair.com header.from=planetbeing@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=planetbeing@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.182.191 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: planetbeing@gmail.com X-Host-Fingerprint: 64.233.182.191 nf-out-0910.google.com Received: from [64.233.182.191] ([64.233.182.191:4341] helo=nf-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 31/30-18302-A61A1E64 for ; Fri, 07 Sep 2007 15:07:23 -0400 Received: by nf-out-0910.google.com with SMTP id b21so461031nfd for ; Fri, 07 Sep 2007 12:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=bDYQfCbPKDWyPuk2g8RZ+yNMBQw1AWXLpW6ZdSfYDes=; b=KBM91d+67pbP8DwUocOzDjKhIlFbis3BJqsT10NNhmZl8cd219JQsV1LTvOyoLq0sMp6mp+0vTT4pL6PePlxc5nlFjom32puZ6Kyqz1ELUhHa6SMK9nWGWJHDKLY/a6ZAE5jVXO16uNM+pVE76pyZbqc/Rrzi85EVDr8CXMEd9M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WjZtFGlN1cedJcI/yUpvGy/10gamIyoc4aGEMJmJBlUQOuO2aLgTqN8pM69jF55PE5x3dIkOjZ1vEjo/VhpPFbwQ9uxcrg3URrILXqGP8PFI2oemlfLFdMZxPKeA+Tkqr0GncUKjeUvxpm+qS9MxIaDWApJ8/c/6kD92Av0orgE= Received: by 10.78.145.5 with SMTP id s5mr901131hud.1189192039335; Fri, 07 Sep 2007 12:07:19 -0700 (PDT) Received: by 10.78.135.16 with HTTP; Fri, 7 Sep 2007 12:07:19 -0700 (PDT) Message-ID: Date: Sat, 8 Sep 2007 03:07:19 +0800 To: "Andi Gutmans" Cc: "Cristian Rodriguez" , internals@lists.php.net In-Reply-To: <698DE66518E7CA45812BD18E807866CEA2AAA3@us-ex1.zend.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <849426349.20070904210047@marcus-boerger.de> <698DE66518E7CA45812BD18E807866CEA2A93C@us-ex1.zend.net> <7d5a202f0709070106r5cc0cbb0n2d58d6f8a4e1c9a3@mail.gmail.com> <698DE66518E7CA45812BD18E807866CEA2AAA3@us-ex1.zend.net> Subject: Re: [PHP-DEV] Patch for macros for tracking refcount and is_ref From: planetbeing@gmail.com ("David Wang") Here's my analysis of what the options are: In my mind, the macros patch is actually unrelated to the GC patch. It is a Good Idea (tm) to use macros to manipulate refcounts no matter if the GC is enabled, disabled, present in the source, or not added at all. The only question is whether to break source compatibility just for the sake of the aesthetics and cleanness of using macros to manipulate refcounts. If one accepts that PHP should and will use macros to manipulate refcounts in the future no matter what happens, then it's only a question of when to break source compatibility. The choice is either right now, or (if the GC is added) when the GC is added, or (if the GC is not added) at some undefined point in the future. Breaking it now instead of later might save some more work in the future, because new refcount manipulations might be added that will also have to be changed later. However, breaking it now without adding a new feature (GC) might seem rather arbitrary to developers of PECL extensions. Breaking it when GC is added might be an easier pill to swallow. It's probably also true that the work saved if we break source compatibility early is not extremely significant: Replacing two "z->refcount++"s in your code is about as much work as just replacing one. It may also be true that the addition of GC might require the source of some extensions that do heavy refcount manipulation to be looked at at that point anyway (don't worry! I think this is actually VERY unlikely, but nevertheless possible) so it might be more efficient to break source compatibility at the point where the GC is officially added. In consideration of those points, and in the interest of moving things along I am in favor of going with the version with ZEND_GC, but removing that option when the GC is integrated in some form or another. Deferring the source compatibility break is not very expensive in any case. David