ml1.org.uk Frequently Asked Questions

Frequently Asked Questions

A few questions seem to be asked quite a lot, so this section will attempt to answer them.

Why do you use ML/I when you could equally well use awk?
Well, firstly, I was using ML/I years before awk was even invented. Secondly, awk isn't so good at handling free-form input. Yes, you can change the record separator (e.g. to null), but it's still hard to handle multiple lines when the input can vary. This is particularly true when you are looking at variable numbers of delimiters and arguments.
Why don't you use m4 instead?
Arguably perhaps, m4 is much less powerful than ML/I. It also requires a fairly fixed format for macro calls, whereas ML/I accepts practically anything as an input format. This means that macros can be written for the input, rather than input having to be written for the macros.
What is the difference between ML/I and STAGE2?
ML/I and STAGE2 are both macro processors. ML/I was developed primarily as a general purpose macro processor (it has ancestry in GPM), but it was also intended that it be able to bootstrap itself onto a new machine (something I have done many times). On the other hand, STAGE2 was primarily (as far as I know) a link in a chain for implementing a portable programming system; having said that, it is quite a good macro processor in its own right, although macros for it are probably even more unreadable than those for ML/I.

One major difference was the form of input. STAGE2 was designed much more for record-oriented input, with macro calls usually being just for one line of input; one could say that it is card oriented. ML/I was designed for more free-format input, with macro calls potentially spanning many lines of input; one could say that it is paper tape oriented. This was often a disadvantage of ML/I, until the concept of startlines was introduced fairly early on.


Valid XHTML 1.0! Valid CSS!

This site is copyright © 2017 Bob Eager
Last updated: 16 Sep 2017