Some Simple But Powerful APL Characters in METSIM

The Most Powerful APL Characters

APL has a serious set of operator characters. It is hard to choose which are the most powerful.

Some of my favourites are the "comment", "space" and "bracket". They are not often in the spotlight - but they do alot of hard work tirelessly for me.

What I call "comment" is officially called "lamp" and is found using the Alt + comma key combination. It maybe looks like a lamp? or an owl? or "foo" looking over a wall? - or a small roundish capital A?

It is easy to remember as "Comment" - Alt + Comma works for me. Comment is the Babel Fish (Hitch Hiker's Guide to the Galaxy) of APL. Succinct and perfectly logical APL expression on the left of the "comment" symbol", and your explanation of what it does on the right.

It is also a handy way to put a "stop" in an expression on the APL keyboard to quickly look at the part result of an expression up to that point.

The blank space is another of APL's unsung gifts. APL is always very exact in talking to you - and it uses spaces with meaning (to indicate the presence of nothing, or as an indicator of structure) - but APL does not demand that you have the same standards in talking to it (with respect to spaces at least). It's the same with brackets. I have mentioned them before - but it is worth repeating with some further detail. I like to use them to chunk ideas. Is this being a bit lazy? Is it overspecifying what APL knew anyway? Maybe - but at least you can be sure APL is going to do what you had in mind. In time, as you become more familiar with APL you may think you don't need them anymore. You will see more easily what an expression will do (APL always executes right-to-left, executing each valid expression in pieces that are executable, as soon as an executable piece is available). But seeing the "individual executable pieces" of an expression can be tricky, especially a few years after you (or someone else) wrote it. So I think the argument for using brackets when they help you outweighs the argument of not using them becuase the computer doesn't need them.

In any case we don't just live in an APL world, and brackets make it easier to switch back and forth between other standards (such as "precedence" in mathematical operator execution order in other mathematical notations and languages).

Cheers, Jim