Thank you! I'm glad to see my blog post to be inspiring!
I think maybe handle_continue callback can be useful here 🤔
pass/intialize a pure data structure in the init callback, then call start_timer in the handle_continue callback?
That should work, but does not completely resolves the thing that bothers me the most: that we still have two places where initialization happens: when creating a data structure and then some "additional" initialization in handle_continue. Maybe I am too spoiled with traditional OOP languages, and this is OK :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thank you! I'm glad to see my blog post to be inspiring!
I think maybe
handle_continue
callback can be useful here 🤔pass/intialize a pure data structure in the
init
callback, then callstart_timer
in thehandle_continue
callback?Thanks for the feedback!
That should work, but does not completely resolves the thing that bothers me the most: that we still have two places where initialization happens: when creating a data structure and then some "additional" initialization in
handle_continue
. Maybe I am too spoiled with traditional OOP languages, and this is OK :)