[sc34wg3] CTM: Endless loops due to template invocations

Lars Marius Garshol larsga at garshol.priv.no
Mon Nov 5 04:26:11 EST 2007


* Lars Heuer
>
> In CTM it is possible to invoke a template within a template and this
> might lead into an endless loop. [...]
>
> Opinions?

CTM implementations will come in two flavours:

  (1) Good ones, which detect the loop, and stop with a good error
      message.

  (2) Poor ones, which either loop infinitely or until some resource
      (stack space, for example) is exhausted.

The only thing you can hope to achieve with a NOTE is to move some  
implementations from category (2) to (1). Feedback from irate users  
is likely to eventually have the same effect, if this really is an  
issue in practice.

As finalization of CTM approaches you'll receive lots of requests for  
NOTEs of various kinds of variable utility. I guess it's up to you  
how large a percentage of the final spec you'd like to see made up by  
NOTEs. It's entirely possible for this number to approach 80, if you  
don't take a restrictive line. (The reason is that when people  
consider yes/no to a particular NOTE they always consider the NOTE in  
isolation, and so there seems no reason not to include it.)

As you can probably tell I'm very skeptical of NOTEs. If I were you  
I'd just let it drop. There's no end of things that could go wrong in  
an implementation, and you can't have NOTEs for even a tenth of those  
cases. So is this one really special?

--Lars M.


More information about the sc34wg3 mailing list