c style arrays taught in c++ course
Please replace these with std::vector or at least std::array, they're outdated.
We can have a lesson on std::vector and std::array, but C-style arrays are no where near being outdated, less elegant, or less important. In terms of learning, you will want to start from the latter before you proceed to the former two.
I do. it's 4:22am and I haven't slept. So yes. I do
It is good to know both ways. What if one has to maintain legacy code one day?
yes. also embedded systems may lack support for std::array
Some may. I would agree that array and vector should be included along side c style arrays.
more is always better :)
Send Sololearn feedback 😃
Arrays and subscripting is a language feature. std::array and std::vector are standard library features. Not all projects use standard library. So, imo learning the language features, especially the core ones, like arrays, is essential, and learning the standard library is really useful, but is kind of separate and nay even be optional. Learning std::arrays, std::vectors, and whatever else containers without getting a clue about the language provided arrays, is like learning about smart pointers without knowing what a regular pointer is.
Using STL in some embedded projects may be problematic. Some STL functionality may be replaced with the framework's implementations, like in Qt (arguable topic). Different reasons, not very common.
Perhaps the Sololearn developers can add new lessons C++03 and C++11 and give a brief explanation of STL Containers and other features in those, just like the lesson 'HTML5' in the HTML course.
Ok, so we think different but we can all agree on teaching each of the three. That's fine.
I don't quite agree on that. The most is the whole internet. And having read it is good, but probably you're lacking time. You know what I mean?
Yes, but the older one is less important and the SL course is small anyways.
Ahhhh... It's about elegance, not about performance. And if it is not supported by some embedded systems, you can use c arrays again. How many SoloLearners which start learning c++ write embedded systems?
@Hard I don't know exactly what you mean. But in the c course, low level arrays must be covered because a c coder has no other choice.
Yes, if they say you should try to avoid them, they can also introduce c style arrays.
That's interesting. Why do some people refuse to use stl for their projects?