Re: Constant and expression ?

From: Date: Fri, 21 May 2010 17:32:03 +0000
Subject: Re: Constant and expression ?
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-48375@lists.php.net to get a copy of this message
Hi!
Following Richard's e-mail I created a patch and a RFC ( http://wiki.php.net/rfc/enum ) to introduce the enum language structure.
I'm not sure what exactly enums would add except for inability to figure out what is the actual value of the constant. IMHO it just makes code less understandable - now to know what is LOG_LEVEL_ERROR you'd have to count back to last enum value. Enum makes sense when it's a type - but since PHP has no such types, it doesn't seem to be a good fit. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227

« previous php.internals (#48375) next »