← Alle berichten

The language starts explaining itself

Two files now sit beside the engine that between them describe the whole language: a prose specification of about two and a half kilobytes, and a JSON index with a description of every runtime function.

The specification opens the way a specification should:

Write only .phlo files; transpiler generates PHP to /php and assets to /www. No semicolons anywhere.

Then the elements in one line, route prop method function view style script static const, the rule that decides half of daily use, prop runs once and caches; function becomes global PHP, and the routing grammar as six lines covering required, optional, length-constrained, enumerated and slurping segments.

Being able to state a language that briefly is itself information. It means the grammar is small, and it means a newcomer can hold all of it at once instead of learning it in fragments.

The JSON index does the other half. Each runtime function gets a written description, so tooling can explain a call without parsing the implementation. The browser IDE reads both, which is what lets it offer help about the file you have open rather than generic advice.

There is a wider bet in these two files. A language that can be stated in a page can be taught to anything that reads, which increasingly includes tools rather than only people. Making the platform describable and making it teachable look like the same work.

We gebruiken essentiële cookies om deze site te laten werken. Met uw toestemming gebruiken we ook analytics om de site te verbeteren.