sam701 / syconf

A simple configuration language that keeps your config files lean
Apache License 2.0
4 stars 1 forks source link

Prevent recursion #17

Open sam701 opened 4 years ago

sam701 commented 4 years ago

We do not want a Turing complete language. We should eliminate recursion. The following code leads to stack overflow:

let ff = (x, acc, f) =>
    if x == 0 then acc else f(x-1, acc+2, f)

in

ff(20000, 0, ff)
sam701 commented 3 years ago

jsonnet has the same issue (Dec 2020)