Hi!

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 don't see how you can do it without typing variables and functions and doing static type control. Even then - what if you read values from config file or database? Would you have 50-item switch to match config values to typed Enum values?

--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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

Reply via email to