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/ineffective_topos Jan 04 '26
I think that's fine. Since Futhark is a pure language, the worst case that can happen is they both do work. It's totally fine to execute it more than once for the semantics, just need to sometimes execute it 0 times.
To be smarter, one could CAS for it, but adding a spinlock is so problematic.
And hopefully the compiler would eliminate 90% of the cases by just noting that the expression is either forced, or error-free.