3 ms·
> There are probably other interesting properties you can gain by sacrificing Turing-completeness as well. Not the author, but I wrote another sub-Turing langu
by otabdeveloper 11y ago
> There are probably other interesting properties you can gain by sacrificing Turing-completeness as well.
Not the author, but I wrote another sub-Turing language. In my opinion, there's two useful properties: a) type inference -- you can infer the type of the whole program b) you can infer memory use and thus avoid the need for garbage collection or manual memory management. Both properties are very useful for performance, of course. :)
- Ono-Sendai 11y agoHi, I'm writing a total functional language as well. I think that garbage collection is still useful however, as it can collect garbage as the program runs, not just at the end.
- otabdeveloper 11y agoI've managed to make it so my memory use is completely deterministic -- no garbage at all.
- Ono-Sendai 11y agoThat sounds interesting. Any references or notes on that I can read? (or source code :) ) I would say that just because your memory use is deterministic, doesn't mean you don't get garbage. Garbage is just memory that isn't needed any more. for example, in let a = f(x) b = g(y) in a + b If there is working memory used in the body of f(), it will be garbage when f() has finished executing, because it won't be referred to any more. So it could be freed after f is executed and before g is executed, which may reduce the maximum amount of memory required by the program.