News for hackers. Stuff that matters.
Re:What is “Open Recursion”? by LeoNatan25 on Tuesday July 18, 2017 @06:12PM (#14800456)
“The problem is that increment is calling get and set here, but those functions haven’t been declared yet. Unlike JavaScript, Dart doesn’t silently hoist function declarations up.”

Huh? What is this, the 80s?

Re:What is “Open Recursion”? by munificent on Tuesday July 18, 2017 @08:04PM (#14801091)
I'm not sure what you're getting at here. Are you arguing that function hoisting is the better behavior?
Re:What is “Open Recursion”? by fasquoika on Wednesday July 19, 2017 @01:58AM (#14802236)
Note that this is for locals, not toplevel function declarations. https://dartpad.dartlang.org/74e990d984faad26dea0
Re:What is “Open Recursion”? by Scarbutt on Tuesday July 18, 2017 @07:12PM (#14800782)
FWIW, Clojure also by default doesn't let you use functions before they are declared but gives you a construct to do it explicitly, which I haven't seen much in the wild. And since Clojure doesn't have full TCO I guess its use won't rise either.
Re:What is “Open Recursion”? by JadeNB on Tuesday July 18, 2017 @09:11PM (#14801381)
> FWIW, Clojure also by default doesn't let you use functions before they are declared but gives you a construct to do it explicitly, which I haven't seen much in the wild. And since Clojure doesn't have full TCO I guess its use won't rise either.

Honest question: what does TCO have to do with use-before-declaration? (Maybe you mean that self-calls—not the only possible kind of tail call!—aren't natively allowed? I don't use Clojure, so I don't know if that's the case.)

Re:What is “Open Recursion”? by Scarbutt on Wednesday July 19, 2017 @12:34AM (#14802003)
Honest question: what does TCO have to do with use-before-declaration?

Mutual recursion, tails calls to other functions. If you have two functions that each one calls each other you get a compiler error cause one of the two has not seen the definition of the other.

Since selfs-calls are easy to implement they are supported explicitly in Clojure via the recur keyword, they won't blow up the stack, but tails calls to other functions are not posible(without using some weird trickery) in Clojure because of the limitations in the JVM.