by MikeLui · 7y ago · 0 comments
- use C++, given that you stick to some convenient subset of C++ and can use stl
- stick with C and force them to do the basics, like linked lists and string abstractions over and over again.
I guess in the olden days really good students used to develop their own library of C abstractions, and reuse them with several courses; but you can't quite do that if you have C in just one course and what's the point anyway in this day and age ?This could happen for example if the data structure course was in python or java and later courses are in C.
Also you can do the darn list in many ways: single linked list, double, ring, with counter/without counter. All very important in this day and age when you should know to avoid them altogether because linked lists fucks up cache behavior.
Things like strings and pointers are nightmarish in C. Segfaults aplenty.
I've never encountered a segmentation fault since switching to modern C++. Just because you use C++ doesn't mean you have to use the entirety of it.
Welp, time to go back to BASIC everyone. Or Go
Powerful tools can be complex, who would have thought