Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35464 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64272 invoked by uid 1010); 13 Feb 2008 23:04:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 64257 invoked from network); 13 Feb 2008 23:04:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Feb 2008 23:04:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=lars@strojny.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lars@strojny.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain strojny.net designates 85.10.204.248 as permitted sender) X-PHP-List-Original-Sender: lars@strojny.net X-Host-Fingerprint: 85.10.204.248 milch.schokokeks.org Received: from [85.10.204.248] ([85.10.204.248:42518] helo=milch.schokokeks.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C1/65-24174-39773B74 for ; Wed, 13 Feb 2008 18:04:53 -0500 Received: from [192.168.0.8] (xdsl-87-78-208-25.netcologne.de [::ffff:87.78.208.25]) (AUTH: PLAIN lars@schokokeks.org, SSL: TLSv1/SSLv3,256bits,CAMELLIA256-SHA) by milch.schokokeks.org with esmtp; Thu, 14 Feb 2008 00:04:48 +0100 id 000000000002000A.0000000047B37790.000065C8 To: Pierre Joye Cc: PHP Internals List In-Reply-To: References: <1202917630.25345.6.camel@localhost> Content-Type: text/plain; charset=UTF-8 Date: Thu, 14 Feb 2008 00:04:47 +0100 Message-ID: <1202943887.7717.7.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.21.5 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] prepend_include_path()/append_include_path() From: lars@strojny.net (Lars Strojny) Hi Pierre, Am Mittwoch, den 13.02.2008, 23:01 +0100 schrieb Pierre Joye: [...] > > the following patch[1] adds the functions append_include_path() and > > prepend_include_path(). These function are there to make include path > > adjustments easier than it is. Especially append_include_path() is what > > is done most of the time. [...] > I don't think we need two new functions for: Sure? > set_include_path('/some/path' . DIRECTORY_SEPARATOR . get_include_path()); See: prepend_include_path('/some/path'); > set_include_path(. get_include_path() . DIRECTORY_SEPARATOR . '/some/path' ); See: append_include_path('/some/path'); Think about reading the code. What's easier to grasp for you? Introducing this functions is meant to make a) code better readable, b) easier to write the code, as most of the time, include path adjustments are include path appends, so the roundtrip set_include_path(get_include_path() ...) is not suboptimal. On the other hand, introducing this functions will not very likely introduce a lot of new bugs, so the maintenance overhead is lower than the value this functions bring (of course this is my POV, as I wrote that patch :-)). And, for the record, I promise to provide fixes for each the related bug (everyone heard that?). cu, Lars