Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69478 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47600 invoked from network); 3 Oct 2013 16:17:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Oct 2013 16:17:42 -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.215.10 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.215.10 mail.experimentalworks.net Received: from [217.114.215.10] ([217.114.215.10:60455] helo=mail.experimentalworks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 38/11-41587-4A89D425 for ; Thu, 03 Oct 2013 12:17:41 -0400 Received: from [192.168.2.20] (host-188-174-203-237.customer.m-online.net [188.174.203.237]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: johannes@schlueters.de) by mail.experimentalworks.net (Postfix) with ESMTPSA id 13E054006E; Thu, 3 Oct 2013 18:17:48 +0200 (CEST) To: William Bartlett Cc: PHP internals list In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Thu, 03 Oct 2013 18:17:31 +0200 Message-ID: <1380817051.2422.7.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Streams constify API change in master leads to compilation warning for extensions From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Wed, 2013-10-02 at 23:01 -0400, William Bartlett wrote: > My understanding is that the const triggers some optimizations because the > compiler better understands how the variables are used. There's not really much win. In most cases the generated code is exactly the same.*) Such changes are nice to spot bugs as the compiler has more knowledge of the intention and to make C++ compilers happy when using these APIs as C++ is stricter on const. johannes *) there are few cases where this helps with inlining or passing params via register, but here we mostly deal with exported APIs which have to follow the platforms ABI rules.