News for hackers. Stuff that matters.
Re:Java Secret: Using an enum to build a State machine by darklajid on Tuesday July 12, 2011 @04:06PM (#2756298)
No offense, in general I'm in agreement with your post.

But you say 'it's no secret' and admit a couple of lines later that you were 'delighted' when you first heard about this particular feature.

So - I'd like to give the author the benefit of the doubt. No, 'secret' is probably crap here, but it can be surprising and a nice revelation nevertheless.

Re:Java Secret: Using an enum to build a State machine by breckinloggins on Tuesday July 12, 2011 @06:12PM (#2756845)
I think it depends on how you read the "secret" part of the headline. If he means "here's a secret: use enums for state machines in Java", then it's no secret at all. If he meant "here's a secret for how to better implement state machines in Java", then yes, I would call it a secret.

As you might guess, I read it the first way :)

Re:Java Secret: Using an enum to build a State machine by peter_lawrey on Wednesday July 13, 2011 @10:19AM (#2759018)
The secret part is that enums are under utilised even though they have been around since 2004. I would assume that many people don't realise how theyc an be used. Its no secret they exist. ;)