r/ProgrammingLanguages • u/Athas Futhark • Jan 04 '26
Another termination issue
https://futhark-lang.org/blog/2026-01-04-another-termination-issue.html
18
Upvotes
r/ProgrammingLanguages • u/Athas Futhark • Jan 04 '26
View all comments
Show parent comment
1
u/matthieum Jan 06 '26
This is typically handled by a notion of "fuel" or a limited number of interpreter steps -- with a way to raise the limit when necessary.
I'm confused.
I thought those constants were already evaluated at compile-time -- which is how thunks were avoided in the first place.
If they are instead evaluated at run-time -- I assume at the start of the program, then? -- then the same possibility applies: store the result in
Result<T, E>and replace each use of the value bytry value.This unfortunately leads to a branch at each use, but perhaps that's acceptable?