CompuServe Messages

#Pascal or C++ ?

    09-Jan-93 02:23:17
Sb: #Pascal or C++ ?
Fm: Bert Put 100026,175
To: David Segal 76545,1730
Hi David, I dunno if this is any help, but here goes: I'm proficient in both Pascal and C (not C++). I've written large programs in both lanuages and if I were to make a choice between the two, I'd choose C. I learnt Pascal first and have about 4 years of experience under my belt, including file handling, screen handling and small indexes (mainly in memory). Pascal is great for learning structured programming and really helps you to write good, clean, modular code. However, there are some deficiencies in it's file handling routines which can be overcome, but are fiddly. In particular, I needed a way to keep track of deleted records so I could reuse them. This required either a header at the beginning of the file or a seperate file containing the details that would otherwise go into that header (i.e. first/last deleted record nbr, active record count, etc) Again, it can be done, but is fiddly. Enter C. C opens up a whole new world in programming. It's harder to learn than Pascal, only because it works at what I call a "lower" level (i.e. closer to assembly). This is deliberate, in order to give the programmer more power and responsibility. The assumption when writing code in C is that the programmer knows what he is doing. To that end, you have access to such things as pointers and low-level functions, with all the dangers associated with them. [More]