2 ms·
This sounds very interesting. What exactly would be a backward-branch? Are function calls allowed (I feel like they have to be)? Are there any code snippets f
by cloogshicer 5y ago
This sounds very interesting.
What exactly would be a backward-branch? Are function calls allowed (I feel like they have to be)?
Are there any code snippets for this style?
- kwhitefoot 5y agoAccording to Carmack subroutine calls are also disallowed. See https://web.archive.org/web/20210226152857/http://lambda-the-ultimate.org/node/5362 https://web.archive.org/web/20210226152857/http://lambda-the... This sounds very much like programming a traditional Programmable Logic Controller (PLC).
- aaaaaaaaaaab 5y agoWell, a flight control computer is not too different from a PLC.
- MaxBarraclough 5y agoSeems curious to ban functions. If you ban function-pointers then you can statically ensure there's no recursion (including mutual recursion). At that point, all function calls are in principle able to be inlined, so any backtracking is merely a compiler-level implementation detail. iirc, OpenCL C does something similar, banning function pointers and recursion (including mutual recursion), although it does so for different reasons than this pattern.