Cali-Lang is a programming language created in 2015.
#2208on PLDB | 9Years Old |
git clone https://github.com/cali-lang/cali.lang.base
Cali is an object oriented interpreted programming language written in Java. It is an efficiency (glue) language that is loosely typed. Cali has it's own standard library but anyone can create external Java modules to extend Cali. In fact, the entire standard library was written by wrapping Java code.
include console;
include net.rpc;
include rpcDemoObj; // Include demo object.
class rpcDemoServer : rpcServer
{
public main(args)
{
rd = new rpcDemoServer();
console
.println('Starting up rpcDemoServer on localhost:9090')
.println('Hit ctrl-c to kill the server.')
.println('Waiting for calls ...\n')
;
rd.start();
}
cart = [];
public rpcDemoServer()
{
this // Hosted methods
.add('addToCart')
.add('getCart')
;
}
public addToCart(object Item)
{
if(Item instanceof 'rpcDemoObj')
{
console.println("Adding item '" + Item.getModelName() + "' to cart.");
this.cart @= Item;
return true;
}
else { throw "Unexpected object found."; }
}
public getCart()
{
console.println('Returning shopping cart.');
return this.cart;
}
}