News for hackers. Stuff that matters.
Re:Java Secret: Using an enum to build a State machine by icco on Tuesday July 12, 2011 @12:18PM (#2755301)
Page didn't crash in Chrome Beta on Linux.

And I agree, while good knowledge, I don't think this is a secret. I remember a simpler example of this being taught in some of my intro CS classes...

As for doing this in other languages, I think Java's ability to encapsulate is pretty unique... but I'm not sure. In theory you should be able to do something similar in the "pure" OO languages (Ruby, Python, SmallTalk, etc).

Re:Java Secret: Using an enum to build a State machine by gnaritas on Tuesday July 12, 2011 @01:03PM (#2755454)
FYI, Smalltalk is one word, not two crammed together.