Bondy: a new declarative language for the BEAM

Hi all,

On 21 October I will be at Code BEAM Europe in Haarlem presenting Saying What — A New Declarative Language for the BEAM. It is the first public introduction to Bondy, the language.

Some of you know Bondy as the WAMP router. That project continues as Bondy Connect and is getting its 1.0.0 release. The name Bondy now covers the brand and the language. The new website at bondy.io explains how the two fit together.

The language in one paragraph. Bondy is statically typed, functional, relational and rule-based.
It is self-hosted and targets the BEAM. The value model is the Shape, in the Typed Feature Structure tradition. The type system is semantic subtyping over that model: types denote sets of runtime values, and subsumption between Shapes, subtyping between types and membership of a value in a type are one relation, decided by one emptiness oracle at compile time and at runtime alike. Inference is Hindley–Milner on the equational fragment and bidirectional checking everywhere else, and principal types are claimed for that fragment only. Constraint solving is in the HM(X) style, over named constraint domains hosted by Constraint Handling Rules. Effects are capabilities carried in the arrow type, so purity, determinism and sandboxing are subtyping questions. The system is sound by default, and gradual typing is an explicit opt-in. On top sit typed relations with pluggable adapters (ETS, Postgres), derivation rules for deductive queries with provenance, rewrite rules for reactive logic, and GenReactor, an OTP behaviour for a process whose state is a set of constraints the runtime keeps consistent. You can also ignore all of that and write plain functional code, as you would in Erlang.

An early version runs in production with Leapsight clients. The first public release (Apache 2.0) will be announced during the talk.

The series. A conference slot is too short for the whole argument, so I am writing it down as ten essays under the same title, “Saying What”. They are the prequel and the sequel to the talk:

  1. Bondy as Consilience
  2. One noun, more roles
  3. The type that validates
  4. Rules that fire themselves
  5. The process that owns the store
  6. Ask questions of your data
  7. What a function is allowed to do
  8. The alarm that cleared itself
  9. The manifest is a module
  10. One module, five nouns

Questions and criticism are welcome in this thread. For longer discussions, the Bondy community is now on Zulip: https://bondy.zulipchat.com

1 Like