rye icon indicating copy to clipboard operation
rye copied to clipboard

FEATURE: defer?

Open noonien opened this issue 1 year ago • 1 comments

Concurrency examples use a waitgroup, but have to do wg .done at the end of the function. This is not a problem if there are no returns, but once there are multiple returns, the user has to have a wg .done before each return.

Due to how functions are created, I'm guessing implementing defer is not very complicated and would add a lot of value, with IO as well.

noonien avatar Jul 10 '24 18:07 noonien

Frankly, I haven't taken the time to figure out how defer works internally in Go and if we could use that or "simulate" on our own side. I will check it out, thanks!

refaktor avatar Jul 10 '24 21:07 refaktor

First version of defer is comming with next big update v0.0.90.

refaktor avatar Mar 14 '25 01:03 refaktor

Image

First version of defer was added with v0.0.80. It works for functions but I still see some edge cases that I will work on before 0.0.90.

Thanks for the issue, with this I'm closing it.

refaktor avatar Mar 30 '25 09:03 refaktor