m4-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: M4 in python


From: Doug McIlroy
Subject: Re: M4 in python
Date: Sat, 20 Feb 2016 21:33:38 -0500
User-agent: Heirloom mailx 12.5 7/5/10

> i'm really curious and trying to find just one good reason to do that.
> i use both python and m4 but i can't see the point.

> the GNU m4 implementation is mature and written in C 
> so rewrite it in a dynamic language ... seems useless.

Maturity may be golden or it may be sclerotic. Judging by
the overstuffed set of primitives in Gnu m4, I'm not so
sure of its goldenness. One thing I am sure of, a stack-based
language like C is not ideal for implementing macroprocessors.
Coroutines are helpful, and Python has them. I don't know
Python well enough to know whether a coroutine in the
middle of a stream can gracefully retire when it's done,
or whether it must live on as a fat nop until the stream
shuts down. Depending on the answer to that question, a
Python implementation could be cleaner than C. And,
depending on users' tastes, it might not be so overstuffed.

Doug



reply via email to

[Prev in Thread] Current Thread [Next in Thread]