Re: Re: Clarification on the Enum language structure

From: Date: Thu, 17 Feb 2011 20:16:11 +0000
Subject: Re: Re: Clarification on the Enum language structure
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-51462@lists.php.net to get a copy of this message
Hi! I think the proposal in the Wiki is just fine - enums should be simple, restricted to enumeration and be just a syntax sugar for the series of constants/defines.
public function setLogLevel (Levels $logLevel) {
    $this->logLevel = $logLevel;
}
This I think is an overkill. Think about how you would read the log level from config file, for example. More complex cases - like verification, sets of constants, complex behavior, etc. - can be done via plain old classes. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227

« previous php.internals (#51462) next »