[parenscript-devel] Implicit return for function bodies

Vladimir Sedach vsedach at gmail.com
Sun Nov 22 07:27:01 UTC 2009


I've just pushed a patch that should address all the issues raised so
far in this thread. Thank you for the QA Scott!

Regarding try/catch, I'm still on the fence. Anyone have try/catch use
cases where implicit return is not what would be wanted?

Vladimir

2009/11/5  <sblist at me.com>:
> Vladimir and friends,
>
> In the following example, do you think that both
> the try block and the handler blocks should receive
> an explicit return?
>
> I'm not absolutely convinced, but I think that it
> probably should.
>
> PS> (ps (lambda () (try (foo) (:catch (e) e))))
> =>
> "function () {
>     try {
>         return foo();
>     } catch (e) {
>         e;
>     };
> };"
>
> - Scott
>
> On 2009-11-04, at 12:57 PM, Vladimir Sedach wrote:
>
>> Hello,
>>
>> Many of you have been asking for this for a long time, and based on
>> feedback (as well as my own experience) the lack of this feature has
>> been the biggest cause of bugs in PS code, so it's with a bit of joy
>> that I just pushed out a patch to add implicit returns to PS functions
>> (including lambdas and flet/labels) to the repository just now. Please
>> try it out and report any bugs you find!
>>
>> Thank you,
>> Vladimir
>>
>> _______________________________________________
>> parenscript-devel mailing list
>> parenscript-devel at common-lisp.net
>> http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
>
>
> _______________________________________________
> parenscript-devel mailing list
> parenscript-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
>




More information about the parenscript-devel mailing list