Skip to main content
Effectively, First Prototype Based Programming Language on JVM.
Why Cafe?
Features
Simple & easy to use
Cafe is dynamically typed and has simple syntax
var i= 10;
cmd.println(i);
Class Free
Cafe has only one construct: Object!
var obj = {};
cmd.print(obj);
Behavior Delegation
Cafe Object chains to delegate properties
var parent= {age:45};
var child = Object.delegate(parent);
child.age = 18;
cmd.println(child.age);
Modular
Cafe supports Modular Programming
import a from "./cafe_file";
a();
#cafe_file.cafe
export func a(){
cmd.println("Iā€™m in cafe_file");
}
Functional
Supports HoF, Closure & Anonymous function
func a(b){
b();
}
a(func() {
cmd.print("Hey, there!");
});
Flexible DS
Dynamic Lists to store any type of Objects
var list = [10, 20, 30];
list[0:1] = [20];
var sub = list[1:2];
list.add();
list.remove();
cmd.print(sub);
A Cafe Tutorial