日本語

ReactiveDominoJ: A practical implementation of an expand event system supporting reactive programming

The ReactiveDominoJ language

Introduction

ReactiveDominoJ extends DominoJ, a Java-based langauge that can be used as an event system, to support the automation of handler bindings, which means that a handler can be implicitly bound to all the involved events that are automatically found inside itself.

Syntax

To enable the automation in a handler:

{_} += <handler>;

The symbol _ refers to the method slot at the right-hand side. It is syntax sugar for the following syntax.

{<handler>} += <handler>;

As using DominoJ as an event system, this statement binds the handler at the right-hand side to the event at the left-hand side. However, in DominoJ all the events involved in the body of a handler must be manually inferred, and a handler can only be bound to an event in a binding statement. ReactiveDominoJ makes it possible to automatically infer all the involved events inside the handler and then implicitly bind the handelr itself to all of them.

Publications

The ReactiveDominoJ compiler

Download

Usage

To compile a source file written in ReactiveDominoJ:

java -jar ReactiveDominoJCompiler.jar MyClass.java

The execution is the same as other Java programs.

java -cp dominoj.jar:. MyClass