|
|
|
|
|
by antimagic
4081 days ago
|
|
OK, you've piqued my curiosity. I followed a very similar path to your own, but I have ended up as a C programmer professionally, and I'm curious as to what differences you see in the two languages. To me, they are essentially the same, give or take some syntactical differences. Functions and structs, direct access to memory, no classes, etc etc etc. |
|
With that said, it seemed in C that you were closer to the hardware implementation of what pointers do (for instance you could do arithmetic on pointers), making it easier to reference an int with something that was supposed to be a float, or something like that, and to generally make those kinds of memory violation and array bounds errors. Nothing like that was in the original conception of Pascal, because Pascal was supposed to be hardware independent.
I felt like letting your data structures be your program was a natural aspect of Pascal, but something you had to discipline yourself to do in C. Also, the parameter passing syntax for Pascal seemed more readable than all of those *'s and &'s. It could all have boiled down to me understanding Pascal syntax better than C syntax.
This was all based on the C of the early 80s. When I mentioned some of these things to a real C programmer later on, he said: There are compiler warnings for those things nowadays. My favorite language du jour is Python, but I use C when messing around with microcontrollers, so I've finally gotten used to it.