we are new-old team in israel (practiced before 2 years and the past year we didn’t have enough money to practice and now we are going to practice this year). so now we are working with our programmers and we need to choose, what are the disadvantage’s in programming with c++. (basically the reasons why we don’t need to choose c++ and what are the problems with c++ compare to labview)
and what is better labview, java or c++? i guess that my question will be similar to the old known question, what is better iOS or Android, but still, want to hear you guys with the experience.
The simple answer is that no one language is better than the other. They are all perfectly capable of accomplishing all tasks needed for FRC robots. The most important thing is experience. If you or any students have any experience with any languages, go with that one.
If you’re starting with very little programming experience, I’d recommend LabVIEW over C++. LabVIEW is a graphical language, and for simple robot programs its pretty easy.
If you are opposed to a graphical programming language, and you have no experience in either Java or C++, I’d recommend Java, as the language is a little bit simpler and doesn’t have much memory management stuff.
If you have any specific questions, feel free to ask.
I’d encourage you to browse the other thread, but since it is pretty long and pretty old, I’ll answer your questions here as well.
C++ is a very powerful language, the most powerful of the three. C, the language it is based on was intended for writing operating systems. Over the years, features have been added to C to update it to C++ and keep it somewhat modern.
C++ has a very compact and permissive syntax. It allows for raw pointers, reinterpret-casts, goto, and plenty of low level features. Because the language is so diverse, the error messages can be hard to understand. Even harder is identifying the runtime errors. C++ is the only language of the three that allows you to corrupt memory and crash the computer. It is powerful, not easy.
If you have a mentor who knows C++ and is prepared to spend time helping you learn it, this is a great opportunity to use a powerful tool. If not, and you still want to learn it, I’d encourage you to begin as soon as possible, read books, practice sample projects, read through other team’s code and attempt edits, etc.
Plenty teams use all three languages. The real questions is … which is right for you? Discuss this with a teacher or mentor. The forum responses may be interesting, but when your robot doesn’t work, it is the teacher or mentor who will help you, not the forum.
No programming language is better. That being said, I would choose Labview. Last year, we made the decision to program in C++. It ended up not working out for us in the end because we had one programmer who knew it and fooled around the whole time cough Jason coughcough and one who did know it, but not as well as the other guy. During competitions, it was harder to change around all the code and it became harder to diagnose problems (due to the lack of experience).
We are doing this year in Labview because it is simple. I took home the robot for a week and had the thing moving and mostly working (except for anything that required PIDs and shooting). It seemed to be very easy and if all else fails, we can write the code in a few days for the robot. We want to do more advanced stuff (like hooking up arduinos using i2c) and doing better, offboard vision processing. We hope to get the Labview Finite State Machine from NI, but they haven’t responded yet