Should I Use Enums In Android, Part 2

/ tags — javaandroid / categories — dev

By Trevor Elkins (2 minute read)

This past summer I went to Google IO and listened to the performance talk. I didn’t like what Colt had to say about enums, so I wrote a blog post about it. I like to think I started all of the annoying enum discussion, though I’m not sure how accurate that is. Regardless, my post received many thousands of views, generated good discussion, and even received a comment from one of the creators of Java enums!

I want to put the issue to rest, so I’m writing a brief part 2. The Android team talked about the “enum problem” at the latest Android Dev Summit and seemed much more reasonable:

Here are some key points:

This closely matches my previous views. Start with enums, continuously measure, use something different if needed for performance. Hopefully this closes the case.

See Also

Load Comments