Elements 2513 and 2521: Setting enum value from String

Carlo and Marc, thank you for taking this issue in consideration.

Yes, I am aware of the enum of java.lang.Enum quick fix, but then, are you aware of the consequences it has for a cross-platform .NET/java class library? Each and every enum would have to be declared as:

type 
{$IFDEF JAVA}
  Myenum = public enum (a,b,c) of java.lang.Enum;
{$ELSE}
  Myenum = public enum (a,b,c);
{$ENDIF}

(or such, I didn’t check the syntax).

This is ugly, inconvenient and inappropriate for a high-level language that has a built-in support of enums.

Also, I would like to point out the lack and inconnsitency of enumeration functionality, the issue already raised in Can you enumerate an enum?

for el in Myenum do ... does not work on any of .NET or java;

for el: Myenum := low(Myenum) to high(Myenum) do ... works on .NET but fails to compile on java;

for el: Integer := low(Myenum) to high(Myenum) do ... compiles in java, but returns integers rather than strings.

IMO, a more consistent behavior should be provided for a cross-platform context.