In Disarray
One of the things that’s kept me from completing BOOL is that I haven’t been able to make up my mind regarding arrays.
There are two basic directions: All data types can have the native ability to create single or array instances, or the Array type is a special data type that can make an array instance of any data type.
There is also the issue of what should be the array syntax. How are arrays declared, and how are array members referenced?
I think, after all this time, I have finally made up my mind.
Here’s A Point
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.
What’s in a Name?
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:
Hello, World!
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.