When I say raw c++ I mean using more code to do the same thing, having to use more STL code instead of just the very basics, or having less convenience when it comes to ease of use of functions.
Since libraries can be put into vexcode I’ll just edit my post. And finally, while C++ was mainly made to have C performance with OOP, it’s extended much farther in its scope (ha ha coding pun). Vectors, strings, hashmaps (idk if those are in C now, I wouldn’t think so if there’s no strings), and basically the entire STL library tend to be more functional instead of OOP. Should’ve said “doesn’t mean it’s using A LOT of c++ features”. Plus OOP isn’t that horribly overused in vexcode compared to pros, Java is demonic though
Honestly, when I initially heard of OOP I thought it was something cringeworthy and repetitive almost. But, once I started to get familiar with OOP and how it is structured, development became a lot steadier and easier to troubleshoot. The primary advantage of OOP and classes is that you do not need to read the entire code to understand how you use it. You simply write documentation on how to use the class and its functions, what the parameters are, and what is returned from the functions. This is a very very hard to get into the habit of, but once you do whatever you code can be reused again and again. You can copy over the objects you coded for your new robots. Eventually, you’ll have a library large enough with OOP to a point where you simply create an object for each subsystem with a single line of code. This means that every year, you no longer need to write a whole book, but only a couple sentences of what you want accomplished and now you have a fully functional robot. Additionally, when you write with a format that doesn’t utilize objects, you will find that there are limitations. You will reach that limitation relatively quickly, like if you want to build a more complex structure like a 2-3 jointed arm with gravity compensation, or perhaps if you need to be more organized for pure pursuit with odometry. OOP helps you accomplish these things without causing extreme headaches (not to say you won’t have headaches, but you will save yourself a lot more headaches than if you didn’t do OOP).
Once you get into OOP programming, you will realize just how useful it is and you will change how you code to simplify everything you do. It is a very tedious to learn how to get into a habit of OOP, but that is why it is oftentimes better to code the majority of your work in OOP so you can reuse it year after year.
It depends on the situation honestly. In my game engine I’ve been using many classes for different things like items, entity’s, and levels, and graphics is a namespace (the OOP thing that is my favorite it’s so nice). I’ve never really used any classes except in very select situations, such as object detection.
The thing about this though that I disagree with in the context of Vex is that for more complex things, you really should know exactly how the code works. Tomorrow on a 9 hour car ride I’m going to be reading a lot of the pros documentation (and anything that’s open source) and learning exactly how they work, since that broadens my understanding of the VEX ecosystem and what is actually feasible. While in the beginning it is quite useful to not have to read through it all, you eventually should get down into the nitty gritty of exactly how it all works. Obviously with classes you can do that, but I’m only refuting that one specific piece saying that you don’t need to read all the code to understand each function.
I will agree with you though that learning how to write OOP is extremely useful since the entire programming industry is around it, and for large projects it is better than purely functional programming (unless you do some interesting coding). i just think balance is good in all things, and Java putting absolutely every single function into a class is kinda dumb to me.
ngl though this has gotten quite off topic from what library/language we use to how OOP is either good or bad. so to bring it back in, what’s your opinion? Blocks, Python, PROS, or vexcode?
I use PROS, even though I initially used VEXCode. But, I do admit, I feel like newcomers should get familiar with Python and coding in Python or blocks first to get a familiarity with how things work. But, there is quite a bit missing with VEXCode Python that makes me uncomfortable with suggesting people to learn Python before doing C++, and instead go straight to C++ instead of touching VEXCode Python due to so many things missing with it.
What is missing ? As far as I remember, every VEXcode C++ API has an equivalent Python API.
Python is a very nice language. I think people should make random programs for fun before they actually try to code a robot, since then you don’t take class time learning basic things like “the else statement only runs when the if doesn’t” or “don’t put a forever loop inside a forever loop”. As far as I can tell, blocks only really helps with syntax errors, not programming logic, since the “loop inside a loop” mistake was made in blocks. I started programming five or six years ago with the “logo turtle”, and have programmed random useless things off and on since then, in “turtle language”, Python, JavaScript, and now C++. That worked very well for me, and I would suggest playing around with programming before doing VEX since that helps you make lots of mistakes without wasting time. Obviously, though, once you joined VEX, it’s somewhat too late to do that.
I believe it had to do more with the Python culture overall, as compared to C++ equivalencies. I think I am referring to this post I made before:
If I were to watch YouTube tutorials on Python, I would find that many packages are not included (although you did point out that you can add packages using the SD card). I know it’s not your fault and it is a tedious project (and we are grateful for the free software). It’s so close to hitting the mark, and adding in a couple more things would make a world of difference in my opinion.
We are not trying to provide a general purpose Python installation, we provide everything you need to drive and program a robot, that’s the whole point of the V5, it’s not a desktop computer.
this is all just sand someone tricked into thinking, why we gotta argue about pedantics every single time this gets brought up ![]()
I think this thread just highlights the misconceptions many people have about programming in VEX. Python is not any less able or less complete than C++, “custom” libraries can be linked into a VexCode project, and PROS doesn’t overuse OOP (it has less use of OOP than VexCode, and you can use the function oriented C API if you really hate objects that much!). Nor is the PROS API any less intuitive, you’ve just gotten used to the VexCode API over the PROS one (the PROS API is more intuitive to many).
The reality is it literally doesn’t matter, you can literally do everything in one that you can in another, and these misconceptions being spread hurt the ability of people to learn programming, since I can assure you most people will struggle a lot more in C++ than they will in Python. The hot takes on Python being less able I’m sure have convinced some students to not use it, and that’s a bad thing. Many schools have Python focused curriculums, and we even sit external exams writing Python, so programming vex bots in Python would be a direct extension to the curriculum. You will be hard pressed to find C++ being taught in secondary/high schools.
False/misleading comparisons between things which are ultimately up to personal choice aren’t helpful, and are more harmful, especially when some of the arguments given in this thread are questionable at best, and painful to read at times.
The real answer to what’s best to program your bot is, it’s literally just personal choice. They’re all just as capable. There’s no need to bash one or the other.
i like how yall are focusing on pros, vexcode, and robotmesh. but what about the pros rust people?
I believe the correct answer to the question is:
we use the V5 API to code our robots.