← All messages

Every file starts by saying what it is

A small metadata block arrives at the top of each .phlo file:

@ version:     1.0
@ creator:     q-ai.nl
@ description: Serverside WebSocket handler
@ extends:     model
@ type:        abstract class

Until now there was a single directive for one purpose, naming a parent class. A file can now choose its class name, be abstract, sit in a namespace, and carry a version, an author and a description.

The description is the part that changes the platform rather than the file. Once every library states in one line what it is, a browsable catalog becomes possible without anyone writing one: the list of available libraries is generated from the files themselves, so it cannot fall out of date, and turning one on is a click rather than a lookup.

That opens a direction worth following. A file that can describe what it is can also describe what it needs, which would make dependencies something the build resolves instead of something you remember. And a description that lives in the source is one that stays correct when the source moves, which a separate documentation file never manages for long.

The general principle is worth stating plainly, because it keeps recurring: the code should be the description. Anything written in two places will eventually be wrong in one of them.

We use essential cookies to make this site work. With your permission we also use analytics to improve the site.