The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* Re: [TUHS] [patch] do not strip mdoc macros
@ 2019-03-15 21:21 Doug McIlroy
  0 siblings, 0 replies; only message in thread
From: Doug McIlroy @ 2019-03-15 21:21 UTC (permalink / raw)
  To: tuhs

>> But sed, awk, perl, python, ... lex and parse once into an AST or
>> bytecode, removing the recurring cost of comments, etc. that impact
>> groff.  So I don't think it's an even comparison.
> 
> Of course it's a valid comparison.  Which sed or awk or shell script is
> distributed in a stripped/compressed form?  Do they store their AST
> somewhere, so as to avoid recompilation?  They do not.  Just as
> with groff, every parse starts anew.

Comments inside of a macro definition get scanned each time it's called.
This justifies the first paragraph above.

In the wild, almost all comments occur outside macro definitions.
This justifies the second.

Thus comments are harmless in practice.

Doug

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-03-15 21:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-15 21:21 [TUHS] [patch] do not strip mdoc macros Doug McIlroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).