Sujet : Re: transpiling to low level C
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 17. Dec 2024, 18:18:27
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vjsbp3$1r3ns$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 17.12.2024 17:17, bart wrote:
On 17/12/2024 01:19, Keith Thompson wrote:
[...]
>
"""
[...] but it isn't strictly *necessary*. [...]
"""
This doesn't actually make much sense. So 'goto' is necessary, but
'goto' *is*?
Have you issues with reading? ("isn't" is not "is", and Keith's
"[*theoretically*] unnecessary" is not "necessary".)
If you try to extract any meaning, it is that any control flow can be
expressed either with 'goto' or with 'recursive functions'.
It's actually the other way round; you can specify functionality
using Recursive Functions, only a subset of these functions can
be expressed with simple loops by algorithmic transformations.[*]
(Of course you *could* thus also take an approach the other way
round, i.e. from an imperative 'while' to a recursive function,
but yet, beyond your [wrong] suppositions, no one was suggesting
that.)
[...]
(I snipped the irrelevant rest that you made up in your confusion
of not knowing.)
Janis
[*] I had started to write a longer post to explain that in detail
to you, though when I saw Keith's terse post I thought that should
suffice. - Alas, no. So all I want to suggest is to read up things
yourself. I'd suggest books from F.L.Bauer ("Algorithmic Language
and Program Development", for example), or from H.Partsch on that
topic; e.g. "Specification and Transformation of Programs".
(You may come back after reading, in case you are still puzzled.)