I've read a lot about a component based entity system and the philosophy of it and that all sounds great. What I haven't read much about, however, is actually implementing one.
I've just found this (http://stackoverflow.com/questions/1901251/component-based-game-engine-design/3495647#3495647) with Google, there are certainly more interesting sources. Let's gather them in this thread :)
True. Never thought of writing in reverse order either heh. That would avoid that. I've not had many problems with the single = vs double = when it comes to if statements. My problem is usually i use == when im doing something like x = 3; I'll write x == 3 instead lol :X
Exchanging the operands is an ugly workaround for a never-occuring beginner mistake.
Writing the value before the variable to compare goes against the intuitive logic and is therefore less readable. We think "if x has the value 3", not "if 3 has the value x". Things get worse when the expression to compare gets more complex, then suddenly
if (x == someObject.someFunction() + 2 * otherFunction())
is more readable thanif (someObject.someFunction() + 2 * otherFunction() == x)
Furthermore, the workaround does not work anymore as soon as the expression to compare is an lvalue or non-scalar rvalue, i.e. it can be assigned.
What I do not understand though is why component-based design is considered the opposite of OOP. It uses objects as well, in fact object orientation is a fundamental part of it. I guess this misbelief results from Java programmers who directly associate OOP with inheritance and deep hierarchies.