For a long time the “Hello, World!” program was the first app a programmer tried with a new language or situation. It’s a quick way to test the general operation of things.
When it comes to object-oriented languages, an object-oriented first program needs a simple object. I’ve long thought that the “XY Point” made an outstanding “Hello, World!” object. It’s basically very simple, so it’s easy to do. And you can extend on it nicely once you get your Point working. You can extend a 2D Point to a 3D Point, or use Points to create Shapes.
This article is about how you create a Point Model in BOOL.
In the last article I explained where the name, BOOL, comes from. This article concerns the names of things within BOOL.
Languages have various terms for the concepts reified by by the language. For example: “sub-routine”, “function”, “method” and “procedure” all describe the same thing, a chunk of code that can be called by other code. The terminology for data objects is even more diverse!
In part to find the most descriptive words—but also to find new terminology for fun—BOOL has its own terms for the basic concepts.
BOOL is a language of a fevered imagination—the result of years of tinkering, infrequent bursts of activity and long dry spells. BOOL is at least 20 years in the making, and it has been through many versions and variations. It’s like a model train project I’ve been working on in my spare time for many years!
It was never intended as a serious language, so developing the spec and the supporting software (for what is a language spec without at least one compiler?) has never been a serious project. Still, this one never went away, and getting it into the light of day after all this time seems only right and just.
The name, BOOL, has four references:
The title, “Hello, World!” is especially appropriate for a blog about a programming language. After all, the phrase comes from books about programming languages.
I’ll expand this post later, but for now, without further ado, here is the canonical “Hello, World!” program in BOOL:
@@main . print: "Hello, World!" ;
That is the simplest version possible.