Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24408 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11668 invoked by uid 1010); 16 Jul 2006 02:53:01 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 11647 invoked from network); 16 Jul 2006 02:53:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jul 2006 02:53:01 -0000 X-PHP-List-Original-Sender: robert@interjinn.com X-Host-Fingerprint: 66.11.173.122 unknown Received: from ([66.11.173.122:60058] helo=interjinn.com) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 9B/66-11992-FA8A9B44 for ; Sat, 15 Jul 2006 22:47:14 -0400 Received: from [192.168.1.3] (blobule.suds [192.168.1.3]) by interjinn.com (Postfix) with ESMTP id 753C811FB75; Sat, 15 Jul 2006 22:47:05 -0400 (EDT) To: ceo@l-i-e.com Cc: pierre.php@gmail.com, internals@lists.php.net, Marcus Boerger In-Reply-To: <56975.64.4.222.245.1153017351.squirrel@www.l-i-e.com> References: <347185750.20060715202622@marcus-boerger.de> <20060715204801.4e02c985@pierre-u64> <56975.64.4.222.245.1153017351.squirrel@www.l-i-e.com> Content-Type: text/plain Organization: InterJinn Message-ID: <1153018028.3177.4.camel@blobule> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6-1mdk Date: Sat, 15 Jul 2006 22:47:08 -0400 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Long awaited line directive From: robert@interjinn.com (Robert Cummings) On Sat, 2006-07-15 at 22:35, Richard Lynch wrote: > On Sat, July 15, 2006 1:48 pm, Pierre wrote: > > On Sat, 15 Jul 2006 20:26:22 +0200 > > mail@marcus-boerger.de (Marcus Boerger) wrote: > > > >> Hello internals, > >> > >> attached is a patch that brings the '#line' directive to php. > >> This is especially usefull for parser generators or any other > >> code shuffling/generator tools. Any opinions? If nothing speaks > >> against i'd like to commit this before heading towards OSCON > >> be end of next week. (oatch is against head of course). > >> > > > > To complete the request, one example (if you are not familiar with > > other generators or languages): > > > > 1. include 'somfile.php' > > 2. > > #line 1 "linedirective.php" > > 4. class Foo // treated as line 1 > > Please don't do this. > > It's hard enough to get the masses of PHP users to provide decent > source and line number matchups to help them debug their messes as it > is. > > They're just going to use this to make life much much worse... > > I can understand why there are SOME uber-geek desires for this, but, > honestly, I just don't see the benefits outweighing the nightmare it > creates... This has some really good implications for helping PHP users get the line numbers more correct. For instance, from what I gather, my template engine can use this to dynamically generate PHP code from an XML tag and when the generated code fails due to some syntax error based on the tag's attributes, If my engine included this directive then the engine will tell them in what included template source file and on what line they screwed up rather than them seeing an error that has no obvious relationship whatsoever to what they did (did I get that right Marcus?). Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------'