Quote:
Originally Posted by BradAMiller
Actually it's the opposite. To make C++ work really well, the libraries have been developed as a series of classes that implement all the sensors, motors, etc. Then the idea is to add C wrappers around the class methods (functions). We're currently trying to decide if the wrappers are really necessary since one could write the entire robot program using only C code except when calling the methods for those sensors and motors. And even that looks a lot like C. The upside for not doing the wrappers is that it allows the C++ code to be much more flexible and easy to use.
Any thoughts?
Brad Miller
WPI Robotics Resource Center
|
I program in C using a C++ compiler every day. Sometimes we use a C++ feature and we're doing it more every day but often our code looks just like a standard C program. I wouldn't bother putting C wrappers around your classes. If the only issue is calling the class's member functions, Almost anyone can learn how to do that. Provided it is described in the WPILib documentation.
How close is the new library to existing WPILib? I want to get my team up and running as soon as possible and I was wondering if it is worth it to learn the old WPILib on the old controller?