The point of these examples is to show how an object oriented programming style could be used in C. We start with a tiny example in Java. Our goal is to produce C code that feels the same as the Java code. The example describes classes Point and Vector. You can add a vector to a point. A basic design decision in both languages is whether doing so modifies the point or creates a new point that is the result of the addition. Directory "javaVersion" does the former, "javaVersionImmutable" the latter. The "cVersion" code represents objects as structs. This lets you create the actual object on the stack, something Java never does. It lets you pass by value, which again doesn't conform to Java semantics, and so is a bit unfamiliar. On the other hand, C has return by value, which turns out to be very handy if you want what we're calling immutable Points. The "cVersionPtrs" typedef's the classes to pointers. That ends up allowing code that feels a lot more Java-like. At the same time, because C has no garbage collection, it imposes a burden on the C programmer that the Java programmer doesn't have to bear. One example is that it can be difficult to make chained operations on an object work.