My google search for

private "enum member" site:digitalmars.com

come up with nothing much so presumably this hasn't been discussed before.

There may be a valid use-case for being allowed to selectively mark
some enum members as being private, such as

enum Color {
  private UNINITIALIZED = -1,
  RED, GREEN, BLUE
}

(The above doesn't work in D1.  Haven't tried D2 though.)

(btw. Interestingly, typing this code into Eclipse with the Descent plug-in
causes a Java out of heap space malfunction.)

Is this a valid use-case?  What do you think?

-- Justin Johansson

Reply via email to