joergen7 / cuneiform

Cuneiform distributed programming language

Home Page:https://cuneiform-lang.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Early return from foreign scripts

yetinam opened this issue · comments

There seems to be no way of early returning from a function. Code style could improve significantly with this function.

In addition the use of a language specific early return (like exit() ) in python, leads to Cuneiform crashing, even if all output parameters are already well-defined.

Example:

deftask early (foo : bar) in python *{
foo = "foo"
print "a"
if bar:
    print "b"
    exit()
print "c"
}*
early(bar:"");    # works fine
early(bar:" ");    # tries to return early and crashes

indeed, that would be doable.

I have decided to not implement this feature because it does not fit the way Effi composes scripts. We make similar compromises also for other languages to fit into Cuneiform.