Monthly Archives: January, 2013

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.

Continue reading →

Advertisements

Symbol Crazy

By now you’ve noticed that BOOL uses a lot of symbols. It steals (and runs with) the ball from Perl mostly, which uses punctuation symbols to determine basic data types (scalar, array, hash, and so forth). Many forms of BASIC have also used punctuation symbols to determine data type.

BOOL uses them to define basic meta-types of objects in BOOL, and it uses them to distinguish between definitions of new objects and references to existing objects.

And while it does make BOOL have a bit of that “line noise” look that so uglifies Perl, the syntax has been there from the very beginning, so it’s not going anywhere. Consider it part of BOOL’s “charm”.

Continue reading →

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.

Continue reading →

Speaking of Names

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.

Continue reading →

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:

Continue reading →

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.

Continue reading →