Re: [PATCH] Allow constant expressions

From: Date: Tue, 08 Apr 2003 13:59:47 +0000
Subject: Re: [PATCH] Allow constant expressions
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-787@lists.php.net to get a copy of this message
On Tue, 2003-04-08 at 06:37, Zeev Suraski wrote: > Nice patch, but one problem - it allows users to use constants as a part of > those expressions... Since the values of those are not known until compile > time, we have an issue there. Technically we can disallow such constants > from being used in those expressions, but I'm not sure how well we can > explain this (you can use constants, but not in expressions?) I don't > know, maybe it's an ok thing to say. > Hah. I have a second patch pending (just this problem) which folds constants into their corresponding values, but I left it out because I felt it more controversial. I think that if you use a constant in an assignment to another constant, that constant should "lookupable" a compile time, and neatly folded into the constant definition itself. If this is something people are ok with, I'll add that to the patch. -Sterling -- "Programming today is a race between software engineers stirring to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." - Unknown

« previous php.internals (#787) next »