Post #3030754
2026-06-01 18:57 UTC
@slava@mathstodon.xyz @zwarich@hachyderm.io @joe@f.duriansoftware.com I've been bitten too many times by "declarations produce unit" to believe everything is naturally an expression. I can generally live with "you can force everything to be an expression" though. (The big misstep was "loops do an implicit collect" but I think everyone's in agreement about that these days.)
Replies (1)
-
@joe@f.duriansoftware.com 2026-06-01 20:20
@jrose@social.belkadan.com @slava@mathstodon.xyz @zwarich@hachyderm.io my sense is that explicit declaration types and nodiscard-by-default would mitigate most of the problems with accidental unintended returns if you wanted to reinvent “statements” within an expression framework, maybe you could have another Decl unitary type that diagnoses if you try to return it, or it gets inferred into local function types