3 ms·
I completely agree. Its kind of sad to see student get stuck on simple tasks on problems that would never show up in a higher level language and end up just ser
by ufo 13y ago
I completely agree. Its kind of sad to see student get stuck on simple tasks on problems that would never show up in a higher level language and end up just serving to distract them.
The undefined behaviour is particularly bad. Its hard to tell if a wrong result is coming from a wrong algorithm or from some undefined behaviour that is silently messing up your results and this only serves to confuse students. Its also a PITA to debuig segfaults - even just getting a stack trace means that you need to use a separate debugger tool.
Another thing you didn't mention about the garbage collection is that it makes it much harder to do string handling. For example, the simple task of reading a name from standard input has multiple solutions and but all the simple ones (scanf and gets) are potentially dangerous. And this is not counting the off-by one erros in allocation because of forgetting to account for the null terminator.