Burro

Columns: Command or Macro?

Thoughts about using the columns command as macro testbed • 2023-07-19Michael Rees


It's occurred to me that I could have possibly implemented columns—the feature that ground progress to a halt for months—much more simply by changing the margins sizes intelligently and using the original layout algorithm while emitting text in "columns." Rather than dwelling on this and trying to fix it now, I'm going to hold off until the macro system is built as part of the 0.2 release.

Columns will serve as a good test case for the macro system. To build columns, we'll have to be able to control much of the layout from within a macro. Once it's possible to make an alternate columns command with a macro, the macro system will likely be ready for most anything we can think of.

More generally, once the macro system is in place, we'll evaluate all of the existing commands and see which, if any, it makes sense to rewrite as a macro. I'm waiting to implement some commands, such as section headers, until after the macro system because it seems very likely that they'll end up being done as macros. For other commands, the distinction isn't quite so clear.

There are arguments for both moving most features into macros vs. keeping as native commands. A possible advantage of Burro could be to add as many core features as possible, ensuring that everything works well together while having the performance boost of being native code. Alternatively, keeping most things in the macro system helps the core layout algorithm remain as simple as possible.

Have a comment or want to start a discussion? Please email it to the Burro discussion list!