The Cyan Object-oriented Language

Cyan is a statically-typed and prototype-based language for the JVM. The language has several innovations mainly in its Metaobject Protocol that allows tailoring the language to the developer’s goals. It supports all the expected features of modern languages and much more.

 

Features

Simplicity is the main goal
No bells and whistles, complex features are implemented using metaobjects, outside the language
Safe object initialization
The compiler guarantees that every local variable and object field is initialized before used, with few exceptions
All types are non-nullable
Nullable types are only possible with unions like String|Nil. There is never a null pointer exception in Cyan
Safe object initialization
The compiler guarantees that every local variable and object field is initialized before used.
Gradual typing
Code either as in a statically-typed language or as in a dynamically-typed language or both at the same time
Generic prototypes with Concepts
Restrict the acceptable real types for generic prototypes using a concept language
Object-oriented exception handling system
Exception handling is made using regular message passing
Metaobjects
There is a huge Metaobject Protocol with six different kinds of metaobjects that allows to tailor the language to the developer’s needs
Domain-specific languages
Null pointer exceptions never happen in Cyan. Nil is not a subtype or supertype of any type but Dyn, a virtual type. Safe downcasts.
And much more
Single inheritance with interfaces
Everything (almost) is an object
Basic type values are objects
Literal arrays, tuples, intervals, and maps Anonymous functions
Context objects, a generalization of anonymous functions
A project language for defining the program
Java integration