Bitfields in jME code


Hello guys,

I have seen several bitfields being used along jME (i.e. (lockedMode & Spatial.LOCKED_TRANSFORMS)).

I have recently seen this presentation about Bitfields in Java, so you might as well be interested on it:

http://sites.google.com/site/io/effective-java-reloaded

He talks about Bitfields, and several other things (by the way this guy went completely nuts long ago  ;)). He explains performance implications of Bitfields so... just for you to know.

According to him, "bitfields" are not Java  :D.

I don't really know if performance would really not be impacted.

The slides are an interesting read. I never thought of enums implementing interfaces.

Yeah, we are definitely not done moving everything to 1.5 syntax that we could.



I got to meet Josh Bloch at JavaOne this year and got a signed copy of that book. :slight_smile:

:smiley: :smiley: Coool!



I bought mine two days ago. Still waiting for it :).

Got it. Read it. Definitely a must.



I will keep the generics stuff for reference though. It was pretty dense and I haven't yet fully understood them.



I strongly recommend it guys. I reckon it is well spent money for most of us.