Comment by joelgwebber: I've been mocking up a proposal very much like this, actually. I guess that's a good sign.
The biggest complication is that enums extend Object, and can implement interfaces. And because we can't always tighten the types in practice, you need virtual dispatch on Number (!) or some other compiler magic. I'll update this article sometime soon with what I've come up with so far. It's a bit complex, but I'm fairly certain it will work, and let us just use integers as you've proposed. For more information: http://code.google.com/p/google-web-toolkit/wiki/EnumOptimizations --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
