|
Re: C++ vs. Java Performance
1) Java is definitely easier to pick up from scratch than C++, and I would argue that it is easier for C++ programmers to pick up Java than visa versa. As for the code being "clean", that is a matter of preference, but I would tend to agree that Java looks cleaner to me (for example, all objects are passed by reference implicitly whereas in C++ you specify explicitly whether to pass by value, reference, const reference, pointer, const pointer...).
2) Like Eric said, I don't think any of the beta testing teams observed Java to be any slower than C++ (and the only truly taxing processing that FIRST robots do - computer vision - is outsourced to NI's vision library which is written in native C).
3) Again, this is a preference thing, but I prefer the simplicity of threading in Java. On the FIRST Forums, I have posted Team 341's ported 2009 C++ code, and we use some threads in there (take a look!).
|