lunes, 28 de julio de 2008

C as a high-level assembly language of sorts.

So, how come the C programming language is still so popular after all these years? How come there are so many people out there still using it for their projects? Petzold gives us a clue:
I mentioned earlier that most high-level languages don't include bit-shifting operations or Boolean operations on bits, which are features supported by many processors. C is the exception to this rule. In addition, an important feature of C is its support of pointers, which are essentially numeric memory addresses. Because C has operations that parallel many common processors instructions, C is sometimes categorized as a high-level assembly language. More than any ALGOL-like language, C closely mimics common processor instruction sets.

(Petzold: p. 363)

Simply put, it still is the best programming language for systems programming in general. If you need to do something really complex without resorting to assembly language (i.e., an operating system or a heavy application, for instance), C is still a safe bet. Which brings up another issue: what if you are not a programmer? Well, I'd say even if you are not involved in any systems programming at all, you are better off being fluent in C for most of the operating systems out there are written in that language. You will need it, if only to troubleshoot and understand whichever problem you may come across of while running your favorite OS. Let's face it: gaining a decent understanding of how computing works without knowing any C is pretty tough.

No hay comentarios: