True but it will have with type hinting, making code more 'bullet proof' Dmitri Snytkine Web Developer Ultra Logistics, Inc. Phone: (888) 220-4640 x 2097 Fax: (888) 795-6642 E-Mail: dsnytk...@ultralogistics.com Web: www.ultralogistics.com
"A Top 100 Logistics I.T. Provider in 2011" -----Original Message----- From: Stas Malyshev [mailto:smalys...@sugarcrm.com] Sent: Wednesday, February 22, 2012 6:07 PM To: Dmitri Snytkine Cc: 'Sebastian Krebs'; 'PHP internals list' Subject: Re: [PHP-DEV] [RFC] Enum proposal (yet another) Hi! > For those who keep saying "but this can already be done in php", here is a > pretty good article. > Long time ago enums were not available in Java also, so this article > explains that yes, thigs can technically could be done before the enum, and > why certain things are better with enums. > > http://javarevisited.blogspot.com/2011/08/enum-in-java-example-tutorial.html One note here: Java is a statically typed compiled language. PHP is not. So many arguments regarding type safety, etc. which are completely valid in regards to Java have no validity in regard to PHP. I understand that some people want to import some bits from strictly typed languages, imagining that this will provide them with benefits that statically typed languages have, namely compile-time safety checks, etc. This does not work as well in dynamic languages. Note for example that neither Ruby nor Python have enums, though you can do similar things there. -- 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