|
|
|
|
|
by yossi_peti
5166 days ago
|
|
I'm not sure I'd be so quick to say it's not turing complete--the language includes building functions (not first-class functions though), but it might be possible that they can be used to emulate conditionals and branching. Anyway, I'm pretty sure it wouldn't be that hard to extend the language to add some looping and branching constructs to the language, there's nothing really special there to add, it's just another simple type of construct to evaluate. In my understanding, loops are implemented at the lowest level with jump instructions, but I've never really done much low-lever programming so maybe someone else can explain that better. |
|
However modifying it to support conditionals is easy. Just add a built-in function if(condition, expr1, expr2). Now you can build if's. Since the language already properly supports recursive function calls, now it is possible to implement loops through recursion, and you're off and running.