Java Reference
In-Depth Information
to standardize the JavaScript language (see Random Fact 10.1 ). ECMA was
willing to settle for something less than truly useful, standardizing the behavior of
the core language and just a few of its libraries. Because most useful JavaScript
programs need to use more libraries than those defined in the standard,
programmers still go through a lot of tedious trial and error to write JavaScript
code that runs identically on different browsers.
Often, competing standards are developed by different coalitions of vendors. For
example, at the time of this writing, hardware vendors are in disagreement whether
to use the HD DVD or Blu-Ray standard for high-density video disks. As Grace
Hopper, the famous computer science pioneer, observed: ȒThe great thing about
standards is that there are so many to choose fromȓ.
Of course, many important pieces of technology aren't standardized at all.
Consider the Windows operating system. Although Windows is often called a
de-facto standard, it really is no standard at all. Nobody has ever attempted to
define formally what the Windows operating system should do. The behavior
changes at the whim of its vendor. That suits Microsoft just fine, because it makes
it impossible for a third party to create its own version of Windows.
As a computer professional, there will be many times in your career when you
need to make a decision whether to support a particular standard. Consider a
simple example. In this chapter, we use the LinkedList class from the standard
Java library. However, many computer scientists dislike this class because the
interface muddies the distinction between abstract lists and arrays, and the iterators
are clumsy to use. Should you use the LinkedList class in your own code, or
should you implement a better list? If you do the former, you have to deal with a
design that is less than optimal. If you do the latter, other programmers may have a
hard time understanding your code because they aren't familiar with your list class.
CHAPTER SUMMARY
1. A linked list consists of a number of nodes, each of which has a reference to the
next node.
2. Adding and removing elements in the middle of a linked list is efficient.
Search WWH ::




Custom Search