Oak (programming language)

{{Short description|Discontinued programming language}}

{{Use mdy dates|date=June 2013}}

Oak is a discontinued programming language created by James Gosling in 1989, initially for Sun Microsystems' set-top box project. The language later evolved to become Java.

History

{{See also|Java (software platform)#History}}

File:Duke (Java mascot) waving.svg

In 1985, Sun Microsystems 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++, 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 oak tree that stood just outside his office.{{Cite web

|url = http://gcc.uni-paderborn.de/www/WI/WI2/wi2_lit.nsf/64ae864837b22662c12573e70058bbb4/abf8d70f07c12eb3c1256de900638899/$FILE/Java%20Technology%20-%20An%20early%20history.pdf

|title = Java Technology: An early history

|author=Jon Byous

| quote=Gosling called the new language "Oak", after the tree outside his window

| publisher=Sun Microsystems

|date = March 12, 2003

|accessdate = 2009-08-02

}}

By the summer of 1992, they were able to demonstrate portions of the new platform including the Green OS, the Oak language, the libraries, and the hardware. Their first attempt, demonstrated on September 3, 1992, focused on building a PDA device named Star7{{Ref|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 search revealed that Oak was used by Oak Technology.{{cite web

|last1=Murphy |first1=Kieron

|date=1996-10-04 |df=dmy

|url=https://www.infoworld.com/article/2077265/so-why-did-they-decide-to-call-it-java-.html

|title=So why did they decide to call it Java?

|work=JavaWorld

|accessdate=2020-07-15

|quote='The lawyers had told us that we couldn't use the name "OAK" because [it was already trademarked by] Oak Technologies,' said Frank Yellin, a senior engineer at Sun. 'So a brainstorming session was held to come up with ideas for a new name.'

}} Java 1.0 was finally shipped in 1996.{{Cite web

|url = http://blogs.sun.com/jonathan/entry/better_is_always_different

|title = Different Isn't Always Better, But Better's Always

|author = Jonathan I. Schwartz

|date = August 30, 2007

|accessdate = 2009-08-02

|archive-url = https://web.archive.org/web/20090905083207/http://blogs.sun.com/jonathan/entry/better_is_always_different

|archive-date = September 5, 2009

|url-status = dead

}}

Differences with Java

Oak was the basis for what Java 1.0 became later, but there were also some differences:{{Cite web|url = https://www.javaspecialists.eu/archive/Issue055-Once-Upon-an-Oak-....html

|title = Once Upon an Oak ...

|author=Heinz Kabutz

| publisher=javaspecialists.eu

|date=August 26, 2002

|accessdate = 2009-08-02}}{{Cite web |url=http://java.sun.com/people/jag/green/OakSpec0.2.ps |title=Oak Language Specification |publisher=Sun Microsystems, Inc. |accessdate=2015-03-06 |url-status=dead |archiveurl=https://web.archive.org/web/20000816155528/http://java.sun.com/people/jag/green/OakSpec0.2.ps |archivedate=August 16, 2000 }}

Several concepts were planned in the Oak specification but were not implemented in the original language because of time constraints:

  • Unsigned primitive types turned out never to be implemented in Java.{{Cite web|url = http://www.darksleep.com/player/JavaAndUnsignedTypes.html

|title = Java and unsigned int, unsigned short, unsigned byte, unsigned long, etc. (Or rather, the lack thereof)

|accessdate = 2009-08-02}}

  • The enum keyword for enumerated types was implemented in Java for Java 5.0.
  • The assert keyword was implemented in Java for Java 1.4{{Cite web|url = http://java.sun.com/docs/books/jls/assert-spec.html

|title = A Simple Assertion Facility For the Java Programming Language

| publisher=Sun Microsystems

|accessdate = 2009-08-02}}

Other concepts were different from, or improved later, for Java:

  • Abstract methods were defined as in C++.
  • While the Oak default access level was the same as Java's (default) package private access level, it was called "private". Oak did not have an equivalent to Java's private access modifier.

And finally some concepts were later scraped out:

|url = http://modernjass.sourceforge.net/docs/mastersthesis-johannes_rieken.pdf

|title = Design by Contract for Java - Revised

|author=Johannes Rieken

| date=April 24, 2007

|accessdate = 2010-10-02}} Oak had assertions whereby Class 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 and post-conditions, which were inherited but not redefinable in a subclass.{{Cite web

|url = http://bugs.sun.com/view_bug.do?bug_id=4449383

|title = Support For 'Design by Contract', beyond "a simple assertion facility"

| publisher=Sun Microsystems

|accessdate = 2010-10-02}}

See also

References

{{Reflist|2}}