Oak (programming language)
Encyclopedia
Oak was a programming language created by James Gosling
James Gosling
James A. Gosling, OC is a computer scientist, best known as the father of the Java programming language.-Education and career:In 1977, Gosling received a B.Sc in Computer Science from the University of Calgary...

 in 1991, initially for Sun Microsystems
Sun Microsystems
Sun Microsystems, Inc. was a company that sold :computers, computer components, :computer software, and :information technology services. Sun was founded on February 24, 1982...

 set-top box
Set-top box
A set-top box or set-top unit is an information appliance device that generally contains a tuner and connects to a television set and an external source of signal, turning the signal into content which is then displayed on the television screen or other display device.-History:Before the...

 project. The language later evolved to become Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

.

The name Oak was used by Gosling after an oak tree
Oak Tree
Oak Tree may refer to:*Oak, the tree*Oak Tree, County Durham, a village in County Durham, England*The Oaktree Foundation, a youth-run aid and development agency*Oak Tree National, golf club in Edmond, Oklahoma...

 that stood outside his office.

History

In 1991, Sun Microsystems
Sun Microsystems
Sun Microsystems, Inc. was a company that sold :computers, computer components, :computer software, and :information technology services. Sun was founded on February 24, 1982...

 was attempting to develop a new technology for programming next generation smart appliances, which Sun expected to be a major new opportunity.

The team originally considered using C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

, but rejected the idea for several reasons (see Java history).

Initially, Gosling attempted to modify and extend C++ but soon abandoned that in favor of creating a new platform called Green and an entirely new language, which he called Oak, after the tree that stood just outside his office.

By the summer of 1992, they were able to demonstrate portions of the new platform including the Green OS
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

, the Oak language, the libraries, and the hardware. Their first attempt, demonstrated on September 3, 1992, focused on building a PDA
Personal digital assistant
A personal digital assistant , also known as a palmtop computer, or personal data assistant, is a mobile device that functions as a personal information manager. Current PDAs often have the ability to connect to the Internet...

 device named Star7 which had a graphical interface and a smart agent called "Duke" to assist the user.

Oak was renamed Java in 1994 after a trademark
Trademark
A trademark, trade mark, or trade-mark is a distinctive sign or indicator used by an individual, business organization, or other legal entity to identify that the products or services to consumers with which the trademark appears originate from a unique source, and to distinguish its products or...

 search revealed that Oak was used by Oak Technology
Oak Technology
Oak Technology was a supplier of semiconductor chips for sound cards, graphics cards and optical storage devices such as CD-ROM, CD-RW and DVD. In 2003, it was acquired by Zoran Corporation....

. Java 1.0 was finally shipped in 1996.

Differences with Java

Oak was the basis for what Java 1.0 became later, but there were also some differences:
Several concepts were planned in the Oak specification but remained not implemented in the original language because of time constraints:
  • unsigned
    Signedness
    In computing, signedness is a property of data types representing numbers in computer programs. A numeric variable is signed if it can represent both positive and negative numbers, and unsigned if it can only represent non-negative numbers .As signed numbers can represent negative numbers, they...

     primitive types turned out never to be implemented in Java.
  • The enum keyword for enumerated type
    Enumerated type
    In computer programming, an enumerated type is a data type consisting of a set of named values called elements, members or enumerators of the type. The enumerator names are usually identifiers that behave as constants in the language...

    s was implemented in Java for Java 5.0.
  • The assert
    Assertion (computing)
    In computer programming, an assertion is a predicate placed in a program to indicate that the developer thinks that the predicate is always true at that place.For example, the following code contains two assertions:...

     keyword was implemented in Java for Java 1.4


Other concepts were different than, or improved later, for Java:
  • As stated in the Oak specification, integer variable types did not affect their storage allocation. For example byte
    Byte
    The byte is a unit of digital information in computing and telecommunications that most commonly consists of eight bits. Historically, a byte was the number of bits used to encode a single character of text in a computer and for this reason it is the basic addressable element in many computer...

     or short values were stored on 4 byte
    Byte
    The byte is a unit of digital information in computing and telecommunications that most commonly consists of eight bits. Historically, a byte was the number of bits used to encode a single character of text in a computer and for this reason it is the basic addressable element in many computer...

    s of memory. This changed in Java 1.4.
  • abstract
    Abstract type
    In programming languages, an abstract type is a type in a nominative type system which cannot be instantiated. An abstract type may have no implementation, or an incomplete implementation...

     methods
    Method (computer science)
    In object-oriented programming, a method is a subroutine associated with a class. Methods define the behavior to be exhibited by instances of the associated class at program run time...

     were defined as in C++
    C++
    C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

    .
  • The package
    Java package
    A Java package is a mechanism for organizing Java classes into namespaces similar to the modules of Modula. Java packages can be stored in compressed files called JAR files, allowing classes to download faster as a group rather than one at a time...

     private access level did not exist in Oak. Classes
    Class (computer science)
    In object-oriented programming, a class is a construct that is used as a blueprint to create instances of itself – referred to as class instances, class objects, instance objects or simply objects. A class defines constituent members which enable these class instances to have state and behavior...

     with no access modifier were considered private.


And finally some concepts were later scraped out:
  • All exceptions
    Exception handling
    Exception handling is a programming language construct or computer hardware mechanism designed to handle the occurrence of exceptions, special conditions that change the normal flow of program execution....

     were unchecked.
  • It was possible by the unprotect keyword to write code that would not signal asynchronous exceptions.
  • There was some support for Design by Contract
    Design by contract
    Design by contract , also known as programming by contract and design-by-contract programming, is an approach to designing computer software...

    : Oak had assertions
    Assertion (computing)
    In computer programming, an assertion is a predicate placed in a program to indicate that the developer thinks that the predicate is always true at that place.For example, the following code contains two assertions:...

     whereby Class variable
    Class variable
    In object-oriented programming with classes, a class variable is a variable defined in a class of which a single copy exists, regardless of how many instances of the class exist.A class variable is the opposite of an instance variable...

     could be constrained and the constraints were enforced at entry and exit of every public and protected method of the class. Methods could also have their own pre-conditions
    Precondition
    In computer programming, a precondition is a condition or predicate that must always be true just prior to the execution of some section of code or before an operation in a formal specification....

     and post-conditions
    Postcondition
    In computer programming, a postcondition is a condition or predicate that must always be true just after the execution of some section of code or after an operation in a formal specification. Postconditions are sometimes tested using assertions within the code itself...

    , which were inherited but not redefinable in a subclass.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK