Re: Let's discuss enums!
| From: | Rowan Collins | Date: | Fri, 18 Sep 2015 21:36:34 +0000 |
| Subject: | Re: Let's discuss enums! | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-88361@lists.php.net to get a copy of this message | ||
On 18 September 2015 18:31:55 BST, Lester Caine <lester@lsces.co.uk> wrote:
>On 18/09/15 00:06, Rowan Collins wrote:
>> So, what are anyone's thoughts? Am I rambling on too much as usual?
>;)
>
>What happens when you need to switch language?
Yes, the names of enum members should be considered labels, not descriptions. They're strings
only for the convenience of programmers working with them, just like variable names, which would
more efficiently be written $1, $2, etc.
Your enum value might be State::OFF_MAP_E, which would be looked up in a database or translation
library to the appropriate translation of "You are off the East side of the map".
Regards,
--
Rowan Collins
[IMSoP]