*** Welcome to piglix ***

Cool (programming language)

COOL
Paradigm object oriented
Designed by Alexander Aiken
Developer Alexander Aiken
First appeared 1996
Typing discipline static, strong, manifest
Dialects
Cool 2004, Cool 2005, Cool 2006, Cool 2007, Cool 2008, unCool
Influenced by
Sather164, Java, ML, Pascal
Influenced
OCaml

Cool, an acronym for Classroom Object Oriented Language, is a computer programming language designed by Alexander Aiken for use in an undergraduate compiler course project. While small enough for a one term project, Cool still has many of the features of modern programming languages, including objects, automatic memory management, strong static typing and simple reflection.

The reference Cool compiler is written in C++, built fully on the public domain tools. It generates code for a MIPS simulator, SPIM. Thus, the language should port easily to other platforms. It has been used for teaching compilers at many institutions (such as the University of California at Berkeley, where it was first used or Shahid Beheshti University of Iran) and the software is stable.

This language is unrelated to the COOL language included in CLIPS.

As the primary purpose of Cool is instruction, it lacks many of the features common to other, more general programming languages. For instance, the language supports less than comparisons but not greater than. The syntax is very much stripped down, and the "standard library" contains only a few basic classes. Separate compilation is not supported, though the compiler does support multiple source files as input. Every Cool program must define a class Main which must have a no-args main method in which execution flow begins. Namespaces are not supported.

"Hello, world!":

A simple program for computing factorials:


...
Wikipedia

...