[Top][All Lists]

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

Re: Any basic cpp capability m4 cannot do?

From: Eric Blake
Subject: Re: Any basic cpp capability m4 cannot do?
Date: Sat, 10 May 2014 13:52:53 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05/10/2014 01:39 PM, Daniel Goldman wrote:

> Not to go too much on a tangent, I feel uncomfortable labeling m4
> "Turing Complete". I am no expert, but based on my best understanding,
> "Turing Complete" refers to programming languages, and does not apply to
> pre-processors.

M4 is a pre-processor that also happens to be a programming language.
It may not be the most efficient language, and you are correct that no
one would use it to write an OS, but that does not diminish the fact
that it is still a programming language.

> But I think maybe it's going to far to say m4 is "Turing Complete" and
> "can do anything". Maybe it's enough that it's very useful, and can do
> needed pre-processing tasks.

Just because something is Turing Complete doesn't mean it is useful in
an efficient time-frame for all tasks, merely that all tasks that can be
done in finite resources can be done in that language.  You are correct
that different languages have different strengths, and that m4's
strength is in pre-processing tasks, while other tasks easy in many
languages are rather convoluted in m4.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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