[ LiB ] | ![]() ![]() |
How high-level can a language get, and what are the potential problems associated with them? In Star Trek, science-fiction computers communicate with their commanders in an almost human language. Our science fiction tells us that the higher-level a language is, the easier it is to communicate, the better. In real life this isn't the case.
The biggest problem with high-level languages is that they are slower than their low-level counterparts. There is a give-and-take relationship between the speed of development and the efficiency of a program. c is speed efficient because the programmer handles all of the low-level resource management by hand.
Since they aren't as speedy and they handle low-level resource management themselves, high-level languages are not great for engineering systemlevel programs like device drivers or kernels, or other situations in which you need tight control over low-level tasks, like memory allocation. Lack of speed also makes them poorly suited to computationally intensive applications, like those that build data structures and algorithms from scratch. In particular, a low-level language may be more suited to your application if:
It needs to implement complex algorithms or data structures.
It needs to manipulate large data sets.
Execution speed is critical.
The functions are well defined and will not change.
The pros and cons of high-level languages are highlighted in Table 1.2.
Pro | Con |
---|---|
Saves human time | Less efficient during computer runtime |
Portable to many platforms | Specific platforms aren't as efficiently utilized |
Modularity and reusability | Can lead to dizzyingly high number of libraries |
Easier to read, write, and maintain | Loss of some control over code organization |
Auto-management of many bug-prone features | Less low-level control of resources |
Easy to learn | Too many programmers could lower one's salary! |
NOTE
High-level languages are criticized more often for their lack of speed than anything else. But keep in mind that they usually can be compiled or semi-compiled. This can make them much faster than languages like Perl, AWK, or other rivals. Also, today's machines are 500-2000 times faster than their predecessors from the 1980s.
[ LiB ] | ![]() ![]() |