(This promise of ???write once, run anywhere??? has largely
been fulfilled today, but in the beginning days of Java, the popular quip was, ???Java: write once, run away.???)
On the other hand, programmers using C must keep in mind the hardware platform on which the code will
run since, for example, the sizes of data types vary on different machines. An int variable may be 16 bits long
on one computer, and 32 bits long on another. The programmer seeking to write a C program to run on multiple
platforms must accommodate these differences somehow.
Finally, some languages are more secure than others. Strict type checking is one feature designed to
enhance security. This was one of the lauded virtues of Pascal, when Pascal was being promoted in the 1980s
as the answer to all programming problems. Boundary checking on arrays is another feature designed to promote
security, and descriptions of the Java security model boast Java??™s array boundary checking as an advance over
languages such as C.
While all these properties may be desirable, they are not all possible to achieve in the same language. For
instance, the security of strict type checking probably will reduce some forms of programmer expressiveness
(e.
Pages:
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174