Re: Re: Clarification on the Enum language structure
| From: | Alexey Zakhlestin | Date: | Wed, 23 Feb 2011 13:49:21 +0000 |
| Subject: | Re: Re: Clarification on the Enum language structure | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-51514@lists.php.net to get a copy of this message | ||
On Wed, Feb 23, 2011 at 4:35 PM, Martin Scotta <martinscotta@gmail.com> wrote:
> Martin Scotta
>
>
> On Wed, Feb 23, 2011 at 7:12 AM, Ben Schmidt
> <mail_ben_schmidt@yahoo.com.au>wrote:
>
>> Are you suggesting this as an enum member function, or just a regular
>>>> function in any old class?
>>>>
>>>
>>> "Enum member funcion"? How much it should be like a class before you
>>> call it a class?
>>>
>>
>> Exactly. It's crazy. If you want a 'member function' use a class, not an
>> enum.
>>
>
> why not supporting methods for enum values?
> developers will need that, and by providing type hinting, they will just
> create the logic somewhere else...
why would developers need this? can you elaborate with some real-life scenario?
I thought enums are just strong-typed constants
--
Alexey Zakhlestin, http://twitter.com/jimi_dini
http://www.milkfarmsoft.com/