3 ms·
It's actually quite nice to have to explicitly declare when binding scopes are recursive. It's an easy bug to make on accident otherwise. Additionally, a recur
by tel 12y ago
It's actually quite nice to have to explicitly declare when binding scopes are recursive. It's an easy bug to make on accident otherwise.
Additionally, a recursive binding (behind the scenes) is semantically much more complex as it's the effect of having a fixed-point operator called on a higher-order function. It's nice to have to make a specific syntactic call out to have this happen.
- dllthomas 12y agoI weakly agree, having been frustrated by both sides of the issue.
- tel 12y agoI really wish Haskell used `let rec`. It's really easy to accidentally write an infinite loop when all lets are rec, but if you forget the rec you almost certainly will get a name or type error. Maybe I'd hate it after a day, but I think I wouldn't.
- dllthomas 12y agoIn my experience, both errors happen rarely, but both happen, and unintended-rec is much harder to track down.