Returning copies of the values ...
Posted: Sun Jun 29, 2008 7:04 pm
In one of my last blogs I noted that Newlisp, when using blocks of the expressions doesn't return the result of the evaluation of the last expression - but its copy.
It holds for begin, let, lambda, lambda-macro, silent ...
Why is that? Is there any possibility for changing it or additionally providing the versions returning actual value of the last evaluated expression, not its copy? Advantages would be some speed, but also some expressive power. I'm aware that passing actual values as arguments to functions breaks ORO, but returning actual values seems safe to me.
It holds for begin, let, lambda, lambda-macro, silent ...
Why is that? Is there any possibility for changing it or additionally providing the versions returning actual value of the last evaluated expression, not its copy? Advantages would be some speed, but also some expressive power. I'm aware that passing actual values as arguments to functions breaks ORO, but returning actual values seems safe to me.