Why not tail recursion?
futhark-lang.org·2d·
📝Parser Combinators
Preview
Report Post

Posted on January 20, 2026 by Troels Henriksen

Futhark is unusual among functional programming languages in not allowing functions to be recursive. This is to some extent justified by Futhark being a parallel language, and recursive looping being an intrinsically sequential operation, and therefore less crucial. However, most nontrivial parallel algorithms still involve some amount of sequential looping, and so this capability cannot be left out entirely. The reason Futhark still does not allow recursive functions is due to our goal of generating code for restricted targets, most notably GPUs, where recursion is at best inefficient and often impossible, due to restrictions on stack usage. Our solution to this problem is to provide dedicated syntax for sequential looping that is semant…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help