In the original Box2D for C++, every Box2D class is prefixed with 'b2' so as not to conflict with your own classes. This is not the case in the Java port, and I have a class called 'World' that initiates the Box2D world. I could rename the class, or use 'org.jbox2d.dynamics.World' to declare it but that is not the point of this post. My point is that the Java port should also have the 'b2' class prefix, it would make things a lot easier. Why did they decide to remove it anyway?
Conflicting class names, no b2?
JavaI agree with you in this matter. Those who come from C++ background, face problem with this. This was a great way to avoid namespace problem. Other Java Classes don't use this option, but to me it was a great convenience and every language should use this concept for giving programmers more freedom.
_______________________________________________________
It's all about gonzos quest
gonzos quest slot game | gonzos quest
_______________________________________________________
It's all about gonzos quest
gonzos quest slot game | gonzos quest
sarahjon52 wrote:
I agree with you in this matter. Those who come from C++ background, face problem with this. This was a great way to avoid namespace problem. Other Java Classes don't use this option, but to me it was a great convenience and every language should use this concept for giving programmers more freedom.
While this is basically a direct port (with a few extra things), we chose to make some changes that were language specific, and this included some style changes as well. In the end, we're catering to what the majority of the users will be comfortable with, and that will be Java-style notation
Original thread: https://box2d.org/forum/viewtopic.php?t=8021