Hyperapp: V2 using recursion in the source code

Created on 14 Jul 2018  路  3Comments  路  Source: jorgebucaran/hyperapp

Hello! Is it ok to use recursion calls in the hyperapp source code?

For example in dispatch function.

Could you please check this article http://2ality.com/2014/04/call-stack-size.html
and SO question https://stackoverflow.com/questions/37224520/are-functions-in-javascript-tail-call-optimized

Inquiry

Most helpful comment

@dmitrykurmanov Not at all. It's a perfectly reasonable question and it actually took me a few minutes to write that answer as I hadn't actually thought about it yet.

Thank you! 馃檶

All 3 comments

@dmitrykurmanov Yes. Even if the max stack size was a 100, it doesn't really make much sense for an action to return a function that returns a function that... 100 times. There's simply no logical use case for that.

@jorgebucaran I understand. My bad , I don't fully understand how hyperapp2 works yet. Thank you.

@dmitrykurmanov Not at all. It's a perfectly reasonable question and it actually took me a few minutes to write that answer as I hadn't actually thought about it yet.

Thank you! 馃檶

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jorgebucaran picture jorgebucaran  路  3Comments

SkaterDad picture SkaterDad  路  3Comments

rbiggs picture rbiggs  路  4Comments

VictorWinberg picture VictorWinberg  路  3Comments

jscriptcoder picture jscriptcoder  路  4Comments