On 18 September 2015 03:58:57 BST, Stephen Coakley <m...@stephencoakley.com> wrote: >On 09/17/2015 06:06 PM, Rowan Collins wrote: >> member THURSDAY, FRIDAY, SATURDAY, SUNDAY; // don't force people >to >> write each entry on its own line; maybe even the "member" keyword is >too >> much? > >Member is even a little too much IMO. A comma-separated list syntax >would be better, simply because its shorter and more similar to enum >syntax on other languages.
The keyword just felt like it fitted better with the rest of the language, and made the list look less like it's floating when there are other things in the braces (fields, methods, etc). But as you say it's common in other languages to simply have a comma separated list at the start of the declaration, before anything else. I didn't want to get too bogged down in the syntax, though, more to gauge reaction to the general direction, which can be summed up as "an enum is an immutable object, with an easily available name but no other default properties, and a mechanism for decorating with additional properties and methods as desired". Regards, -- Rowan Collins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php