Cricket - Ryan Brewer

Cricket

Cricket is a tiny little functional language. It can be implemented very quickly on various platforms. Cricket is lazy, specifically call-by-name. Side effects are done with explicitly-forced evaluation. Cricket is dynamically typed, and uses objects or lambdas for data. Cricket objects can refer to themselves in their methods, enabling much of OOP. Cricket is immutable, with object updates returning new objects.

Cricket is designed such that ordinary programmers who aren't much into the academic theory behind functional programming can still find it easy and intuitive. No monads, for one. However, if you like the confidence in your code that comes with such solid theoretical foundations, rest assured that Cricket is inspired by fascinating categorical connections. The keywords are call-by-name, negative types, and side effects.


let iter = {
  this.go: args->{
    val: args.start, 
    next: this.go{start: args.step(args.start), step: args.step}
  }
} in 
console.write(iter.go{start: 7, step: n->n-1}.next.next.val)
        

To read more about Cricket, look here.