I wrote:
> Patch 9.0.0370 > Problem: Cleaning up afterwards can make a function messy. > Solution: Add the :defer command. > Files: runtime/doc/eval.txt, src/ex_cmds.h, src/ex_cmdidxs.h, > src/userfunc.c, src/proto/userfunc.pro, src/structs.h, > src/vim9compile.c, src/vim9cmds.c, src/proto/vim9cmds.pro, > src/vim9.h, src/vim9instr.c, src/proto/vim9instr.pro, > src/vim9expr.c, src/proto/vim9expr.pro, src/vim9execute.c, > src/testdir/test_user_func.vim, src/testdir/test_vim9_func.vim, > src/testdir/test_vim9_disassemble.vim This is a nice way to cleanup. The idea comes from Go (although there is probably another language where Go got the idea). Note that the "paint is still wet" on this. It probably doesn't always work, doesn't cleanup in case of failures, needs more testing, etc. But you can see how it works. Eventually it will be more reliable than other mechanisms. Feedback welcome. -- Article in the first Free Software Magazine: "Bram Moolenaar studied electrical engineering at the Technical University of Delft and graduated in 1985 on a multi-processor Unix architecture." Response by "dimator": Could the school not afford a proper stage for the ceremony? /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/20220903205429.75DAD1C0CF3%40moolenaar.net.
