Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28313 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21441 invoked by uid 1010); 9 Mar 2007 22:49:03 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 21426 invoked from network); 9 Mar 2007 22:49:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Mar 2007 22:49:03 -0000 Authentication-Results: pb1.pair.com header.from=cellog@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=cellog@php.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain php.net from 66.79.163.178 cause and error) X-PHP-List-Original-Sender: cellog@php.net X-Host-Fingerprint: 66.79.163.178 bluga.net Linux 2.5 (sometimes 2.4) (4) Received: from [66.79.163.178] ([66.79.163.178:45393] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6F/40-00491-B54E1F54 for ; Fri, 09 Mar 2007 17:49:00 -0500 Received: from mail.bluga.net (mail.bluga.net [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id C99C08743E; Fri, 9 Mar 2007 14:52:05 -0800 (PST) Received: from [192.168.1.41] (pool-71-127-8-27.spfdma.east.verizon.net [71.127.8.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id 7E5268735E; Fri, 9 Mar 2007 14:52:04 -0800 (PST) Message-ID: <45F1E453.6060102@php.net> Date: Fri, 09 Mar 2007 16:48:51 -0600 User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Stanislav Malyshev CC: Ralph Schindler , internals References: <45F076AE.8010001@smashlabs.com> <45F07834.1020801@zend.com> <45F07AA2.9060007@smashlabs.com> <45F07DE6.6070401@zend.com> In-Reply-To: <45F07DE6.6070401@zend.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: [PHP-DEV] Class name clashing From: cellog@php.net (Greg Beaver) Stanislav Malyshev wrote: > No it isn't. I can see no single serious reason why the class must be > named Case or you have to move to Smalltalk or give up OOP altogether. > It's a minuscule annoyance at best. > >> Anyway, I write so that perhaps, maybe, just maybe, someone might want >> to see whats involved instead of simply writing off this request.... > > What's involved is probably changing language parser, not sure even > current flex/yacc combo can do it. sure. All that would be needed is a new rule for each keyword: T_CLASS T_CASE in addition to T_CLASS T_STRING PITA, but possible :). Also possible with flex would be to enter a new state when T_CLASS is found, and return T_STRING for any text. However, I wouldn't want to be the one who implements this, when you can simply add a _ to the class name or use a longer descriptive classname like "UseCase" or "CaseOfVodka" or whatever kind of "case" you're actually modeling. :) Greg