futuRe office labs
1a

projects › main

WCHNT

LINKSWCHNT Site · GitHub · GitLab

"We Can Have Nice Things" (written WCHNT, pronounced WitchChant) is an experimental, assemblage programming language.

See the main site

The main goal is to make object orientated programs easier to read and reason about, by reorganising them around an "assemblage" of classes which are intended to be tightly coupled and work closely together.

WCHNT allows you to declare such an assemblage in a schema whose syntax is inspired by Haskell ADTs and Backus-Naur Form grammars.

It further allows us to annotate the schema with sigils representing special relations between the classes.

Game = PlayArea :Ball Paddle/paddlePlayer Paddle/paddleAi Int/playerScore Int/aiScore $Time Keys
Rect = PlayArea | Paddle
PlayArea = Int/x Int/y Int/width Int/height
Ball = Int/x Int/y Int/dx Int/dy Int/rad
Paddle = Int/x Int/y Int/h Int/w
Time = Int/t
>Keys = Bool/left Bool/right Bool/up Bool/down

(See a full "Pong" example in the live environment.)

Beyond making the assemblage schema the focal point of the program, wchnt helps readability and intelligibility by using literate markdown, a declarative constructor for the whole assemblage, and surfacing target-platform interface code in the same file.

Learn more at wchnt.com