Early return from foreign scripts
yetinam opened this issue · comments
yetinam commented
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
Jörgen Brandt commented
indeed, that would be doable.
Jörgen Brandt commented
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.