|
|
|
|
|
by ufo
5221 days ago
|
|
But do we really need to submit beginners to things like segmentation faults, arrays without bound checks and the lack of a reasonable string datatype? There is no reason to use C as a first language when you can just as well teach all the basic ideas in a more friendly environment and then go through all of K&R in 2 weeks or so. |
|
C has its disadvantages, but you get: 1-a simple syntax 2-good mental exercises in learning, implementing and debugging pointer based data structures 3-a good idea of what is happening at the processor level when a computer program is being run.
You simply don't get that combination in any other language.
There are caveats of course: theres the functional vs procedural argument (which is a higher level argument than this). There could also be a good point that OOP should be the very first thing a student should learn, but only if you teach them a smalltalk based language, not python, java, C++ etc.
For the context of my argument, I chose: 'for teaching first year CS majors their first procedural programming language, what is the best choice?'