Home | Lectures | Written Assignments | Programming Assignments | Exams | Cool

CS 415 - Programming Languages - Cool


Cool is a Classroom Object-Oriented Language -- it is essentially a small subset of Java. It's small enough to be manageable for semester projects but large enough to help you to learn all of the concepts and to write non-trivial programs.

(* hello-world.cl *) 
class Main inherits IO {
  main() : Object {
    out_string("Hello, world.\n")
  } ;
} ;

Language Specification

Cool is formally defined in The Cool Reference Manual, a document that you will grow to love (or hate) over the course of this semester.

The Reference Interpreter

Different versions of the reference interpreter are available for different platforms. Information on running the interpreter is available in the reference manual.

Additional Support

If you like XEmacs, the Berkeley Harmonia project has a Cool mode. It offers quite a bit more than syntax highlighting, but not all of the semantic features are guaranteed to be compatible with our dialect of Cool.