Fair enough, but the case that breaks the bank is body. You really
really really want to do all your body search operations in a
single passs. If you don't you can easily write scripts that have
serious performance problems.
I don't especially care about the case of optimizing the header,
address, envelope, and string tests, but body is a serious
problem. And it seems fairly awkward to say that the match
parameter doesn't get expanded in body but does elsewhere.
(somewhere at the start of the specification:)
A constant string is a string or multi-line value without variable
(in a section on interactions with old and new mechanisms?)
Implementations MAY require match patterns to be constant strings
when used with some test types. Such implementations MUST reject
the activation of scripts with disallowed match patterns.
is it too strong to require the error to be discovered at upload time?
I don't feel good about allowing it to happen during run-time, but
that might be a quality-of-implementation issue.