enum

Meta jared771 at gmail.com
Tue Apr 8 14:46:51 PDT 2014


On Tuesday, 8 April 2014 at 19:09:55 UTC, Andrei Alexandrescu 
wrote:
> 1. Is the current design damaging enough (= allows enough 
> wrong/buggy code to pass through) to warrant a breaking 
> tightening?

Enums in D *should* be tightened to be at least type-safe, but I 
don't think it's a large issue.

> 2. To what extent can library-based approaches help?

You could consider it an embarrassment that we should need a 
library solution to cover up for (arguably) bad design in the 
language. Speaking pragmatically, though, it looks like library 
solutions could possibly take us quite far.

> 3. What is the priority of improving enums in the larger 
> picture of other things we must do?

Enums could stand to be improved, but finishing the 
implementation of the language should take precedent. Figuring 
out scope (which Adam Ruppe had some good ideas for) and shared 
is what instantly comes to mind... These are probably also the 
two hardest tasks remaining. Then there's also making objects 
default non-null, tuple syntax, qualified constructors...


More information about the Digitalmars-d mailing list