Forum

What are the reasons for not allowing recursion in VL?

alpha
vl

#1

Hello devvvvs, let’s start the vl discussions!

I’ll start with something that’s more of a language design question than something urgent (I’ll wait with that until the first official release and better documentation).

Since to my (limited)understanding creating an operation in vl is close to defining a procedure and just that, it’s a definition not an instance of the procedure/operation/path running I had of course to try to define a recursive procedure.

It’s possible to add an operation inside itself but I get something like “Error: cyclic dependency detected”.

To me it seems if it weren’t for the error it would be perfectly possible to patch a recursive operation but the question of course remains if there are any concrete reasons in the inner workings of vl system that makes recursive operations impossible to deal with?

Of course recursive definitions can be confusing but also make some things much easier to express and we could argue all day about pros and cons about recursive and iterative definitions but I in the end I would just like to know if it’s something you’ve decided to leave out for practical or philosophical reasons or something that might possible be added in future versions?


#2

I’d be more strict. recursion should be in vl. i believe in no philosophy which wouldn’t recommend it


#3

Simple answer, we just had no time to implement recursive calls. Of course this will be possible in an upcoming version.


#4

Ok, great!