Hi!

If you're going to go that far, why not make a flyweight enum type?
(Basically what's described here: http://c2.com/cgi/wiki?FlyweightEnum
)...

Right now, it's a hack to get typing in place to let you pass an
integer where a class is defined (the public function foo(MyEnum
$enum) bit).  If you used a flyweight, you could literally type-hint.

Again, it looks like you are trying to introduce strict typing into PHP. I do not think it's a good idea, for the reasons I described at length in previous discussions, but you're free to try. However, I don't see how changing the language to make it easier to do partial backdoor strict typing is a good idea. Bringing Java as an example only supports this point.
--
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