These classnotes are depreciated. As of 2005, I no longer teach the classes. Notes will remain online for legacy purposes

JAVA01/Computer Languages

Classnotes | JAVA01 | RecentChanges | Preferences

There are many different computer languages available for you to program in. Each has its strengths and weaknesses and must be assessed based upon need. A language that is particularily well suited for one application may not work for another.

There are two types of computer languages: high level and low level. Low-level languages are ones which will be very tied to a given hardware, and are very "close to the metal". High-level languages are ones which abstract away much of the low-level grit into a clear, easier to understand (and human readable) language. High-level languages are all we will be focusing on in this course.

Under high level languages are three main classes under which most computer languages fall:

  • Compilable: Languages of this type are writen and then compiled down to a binary that is specific to a given hardware. Most programs you will encounter will have been writen in one of these languages. The advantage to these are speedy executables. The disadvantage is that your executable will only run on very specific hardware.

  • Interpretive: Languages of this type perform compilation to binary at run time, meaning that there is an interpreter sitting between the source code and the computer that converts the instructions in the source code to a language the computer can understand. The advantage of a language like this is that programming in it can be very quick and simple. The disadvantage is that your resulting program will not run as speedily as its compiled cousin.

  • Bytecode: This third class is a relatively new class. The idea behind it is to have a language that can be compiled down into something known as "bytecode" which is like a binary executable but still needs an interpreter to run. It really is an amalgam of the two previous classes. It has the advantage that it is more speedy than an interpretive language (typically) but not quite as speedy as a binary executable (typically). It is also platform-independant, meaning it is not tied to a specific hardware. Java is a bytecode language.

Functions and Libraries

One of the fundamental concepts in programming is that of a function. A function is a segment of code that given some input will perform a specific task and return some output.

You can think of a function as a "black-box", something which performs some task but which you do not need to think about its internal workings outside of that black-box (i.e., your other functions which use that "black-box" do not need to know how it works, just how to use it).

A collection of functions is called a library. Libraries are things that provide a number of different functionalities to your program.

Technically, what we will be looking at in this class will not be functions, but will be things called objects. However, until we go into what objects are, it is useful to think of them as merely functions.



Classnotes | JAVA01 | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited May 27, 2003 7:55 pm (diff)
Search:
(C) Copyright 2003 Samuel Hart
Creative Commons License
This work is licensed under a Creative Commons License.