I wanted to write a few posts on the design of Lattice as a language. Today, let's focus on “composability”. This is intuitively something we desi

Composability: Designing a Visual Programming Language

submited by
Style Pass
2024-04-24 07:00:03

I wanted to write a few posts on the design of Lattice as a language. Today, let's focus on “composability”. This is intuitively something we desire in programming languages. Some systems feel like they are effortlessly reconfigurable, recombinable, and then others.. just don’t. Some languages seem to actively reject our efforts at organization.

Self-Similarity — Composable systems usually have a simple primitive that is self-similar. Think of a game grid, tetris pieces, repeating tessellations, etc.  Self-similarity means most things can plug into other things. They may not do something useful, but they can be infinitely re-arranged.

Merging / Splitting — Two groups of primitives can be merged into a single primitive, and that 'merged primitive' acts just like any other primitive. Similarly, a primitive can be split into several 'pieces' and each of those pieces acts like any other primitive.

Take Legos, perhaps the most composable system in existence. So composable, in fact, that talking about them is almost reductive. But they follow these rules deeply:

Leave a Comment