C. Matlab , Java, and C

2010

Given the ubiquity and importance of computation tools, students do not commonly ask why they should study programming; the more common question is how to go about it. There are two equally valid answers to this question—on one hand, they should choose a language applicable to their field, but on the other, most languages can be applied to any field. Regardless, both answers are good reasons to consider using Matlab. The spectrum of typical introductory languages can be roughly divided into three camps. The first of these comprises imperative languages—particularly C—which closely correspond to the underlying machine and encourage the programmer to manage every low-level detail of the program. The second consists of object-oriented languages such as Java, which provide rich idioms for expressing programming concepts and hide many frustrating differences between various hardware and operating systems. Finally, scientific languages such as Matlab offer powerful data analysis tools and comprehensive mathematical libraries particularly suited to engineering and science applications. Despite their differences, each of these languages can be an appropriate starting point for a beginning programmer. It is worth considering the advantages and disadvantages of each when trying to choose a first programming language (keeping in mind that many students will ultimately learn several different programming languages). The C programming language is one of the oldest, yet it still sees regular service. It was developed in 1972 by Dennis Richie and remains one of the most widely used programming languages. Among its most popular relatives are C++ and Objective-C. Advantages: The language is small and its libraries are concise, so the language features are easy to learn (though difficult to master). Its design and capabilities closely mirror assembly languages that computer processors understand directly, so learning C confers valuable insights into computer hardware architecture. Because of its brevity and low-level design, there is no “magic” in the way C works. While other, higher-level languages may hide complicated programming techniques behind simple interfaces or language features, C has no such artifice; students can genuinely understand how their programs work at every level. The performance of C is excellent; by virtue of its austerity, it can evade many of the overheads incurred by more complicated languages. Finally, C is quite universal—just about every computer and operating system offers a C compiler. Disadvantages: Low-level languages may aid in understanding programs, but they complicate their design. There is a reason higher-level languages offer abstractions and rich libraries—it makes programming much easier. Memory management is a prime example—even simple programs written in C require careful memory management.

Read the paper · More papers on PaperTik