Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48347 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53814 invoked from network); 19 May 2010 11:49:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 May 2010 11:49:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=cschneid@cschneid.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=cschneid@cschneid.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cschneid.com from 195.226.6.51 cause and error) X-PHP-List-Original-Sender: cschneid@cschneid.com X-Host-Fingerprint: 195.226.6.51 darkcity.gna.ch Linux 2.6 Received: from [195.226.6.51] ([195.226.6.51:43106] helo=mail.gna.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A7/D3-34085-660D3FB4 for ; Wed, 19 May 2010 07:49:58 -0400 Received: from localhost (localhost [127.0.0.1]) by darkcity.gna.ch (Postfix) with ESMTP id 90AF3193E37; Wed, 19 May 2010 13:49:55 +0200 (CEST) X-Virus-Scanned: amavisd-new at gna.ch Received: from mail.gna.ch ([127.0.0.1]) by localhost (gna.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SUKRC2q7VpLp; Wed, 19 May 2010 13:49:55 +0200 (CEST) Received: from [192.168.1.72] (80-219-160-142.dclient.hispeed.ch [80.219.160.142]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTPSA id 36D9A193E21; Wed, 19 May 2010 13:49:55 +0200 (CEST) Message-ID: <4BF3D062.3040205@cschneid.com> Date: Wed, 19 May 2010 13:49:54 +0200 User-Agent: Thunderbird 2.0.0.24 (X11/20100302) MIME-Version: 1.0 To: fqqdk CC: PHP internals References: <4BF3A72B.8020903@mageekbox.net> <4BF3B4E2.5070209@mageekbox.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Constant and expression ? From: cschneid@cschneid.com (Christian Schneider) fqqdk wrote: > How about extending the usage of the 'final' keyword to support a java-like > syntax? > > class Foo { > private static final $bar = 'ex' . 'pression'; In my book "final" in Java gets an award for sickest abuse of a keyword. So no, I don't consider this an option. Simply use a class variable (or define()) if you need to store some runtime calculated value. "But can do this" alone is not sufficient as a reason to bloat PHP IMHO. - Chris