Opal Programming Language Help For Students

Introduction to Opal

The algebraic programming language Opal has been designed as the test bed for experiments with the specification and development of functional programs. Opal is not the end all be all of programming languages. It is not perfect. Neither is it an academic or toy language. Opal is designed for solving real-world, large to small scale programming challenges. Opal unifies the entities of modules, functions/methods, classes and properties into its concepts of object and pattern. It also supports multiple programming paradigms (procedural, object-oriented, functional) allowing it to truly take the place of all the languages it is meant to replace.

Example: Calculates the GCD recursively

Signature file:

{`
SIGNATURE GCD
FUN GCD: nat ** nat -> nat
`}
Implementation file:
{`
>
IMPLEMENTATION GCD
IMPORT Nat COMPLETELY
DEF GCD(a,b) == IF a % b = 0 THEN b
ELSE IF a-b < b THEN GCD(b,a-b)
ELSE GCD(a-b,b)
FI
FI
`}

opal

Compiler Download

To get started, see Download and install Opal and follow the instructions....