Unlikely is a programming language that conflates objects with continuations, and methods with labels. It exposes program structures as objects with commensurate inheritance relationships. It also takes dependency injection to the logical extreme: if some class is used by an object, that class must be specified when the object is instantiated.
Sample Program
class Count(Count,Chain,Print,Add) extends Continuation
class CountForever(Count,Chain,Print,Add) extends Program {
Count c;
method continue(Passive accumulator) {
c = new Count(Passive,Count,Chain,Print,Add);
goto c.continue(new 1(Passive));
}
}
class Count() extends Continuation {
Count c;
Print p;
Add a;
method continue(Passive accumulator) {
c = new Count(Passive,Count,Chain,Print,Add);
a = new Add(Passive,Chain);
a.value = new 1(Passive);
a.next = c;
p = new Print(Passive,Chain);
p.next = a;
goto p.continue(accumulator);
}
}
Computational Class
Programming Paradigms
Documentation
Implementations
-
Coldwater, a static analyzer in Python
To run this implementation, you need:
- an implementation of Python (we suggest cPython 2.6.7)
Download
Development
Github: catseye/Unlikely
Bitbucket: catseye/unlikely
Issue tracker: on github