Re: Let's discuss enums!

From: Date: Fri, 18 Sep 2015 18:40:11 +0000
Subject: Re: Let's discuss enums!
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-88352@lists.php.net to get a copy of this message
On 09/18/2015 02:29 PM, Rowan Collins wrote:
Jefferson Gonzalez wrote on 18/09/2015 19:25:
I also believe the rfc should include type hinting of enums as has been mentioned on this discussion. That would make enumerations more useful and the rfc more complete.
It already mentions that: Enums are strongly typed and can be used as parameter or return types. As I understand it, this actually comes for free the way it's implemented, because Enums are actually a type of object, and the enum declaration is effectively a class.
Whoops... just noticed after re-reading the rfc :) thanks! Then I guess the missing bits are an implementation (most important part) and a happy medium for those that believe that behind the scenes (serialization, storage, databases) enumerations should be represented numerically (for the various reasons discussed).

« previous php.internals (#88352) next »