Hacker News new | ask | show | jobs
by analog31 4081 days ago
Good question. And my answer comes with the caveat that I'm not a computer scientist, and could in fact have been wrong. I've made one or two bad bets. I also bet that programming wouldn't be much of a career.

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.

1 comments

Hah :) I was expecting you to come back with something about typecasting, which Pascal, as conceived by Wirth, was determined to make as difficult as possible, if not flatout impossible. This limitation made writing performant software in standard Pascal quite difficult. Which is why most of the popular Pascal implementations provided extensions to make it possible to use Pascal for real problems. I'm thinking notably of MPW Pascal, which was used to write much of the system software for early Macs.
You guessed right. And after I made that pronouncement to myself about C, I kinda lost touch with the programming community, as Turbo Pascal and my programming skills got me through college and gradual school in physics. When I finally came back up for air, of course C had won out, but programming a graphical platform with a low level language seemed too hard, and I reverted to higher level tools such as HyperCard, Visual Basic, and today, Python.