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.

use the function: you would usually be expected to pass in a true enum
constant of the MyEnum type.

That works wonders in dynamic languages, without any means of really
ensuring it.

No, I believe you can ensure it, and you can even ensure it efficiently.
I outlined this in a more lengthy email earlier today. I was against
type hinting until I realised that yes, it could work, and work
efficiently.

Ben.




--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to