> On 3/8/22 5:20 AM, Bram Moolenaar wrote: > > Patch 8.2.4526 > > Problem: Vim9: cannot set variables to a null value. > > Solution: Add null_list, null_job, etc. > > How about an "is_null(t: any): bool" method, (or "isnull()")? I could > roll my own, but the "if else if else ..." seems expensive. (unless it > gets optimized internally into a switch-case :-) )
What is it you want to do? We recently added support for comparing with "null". That will match all the null_* values. Thus allo of these are true: null == null_string null == null_blob null == null_list null == null_function null == null_job Still need to add some more tests. It worked with the functions before, so it should work with the value as well. -- hundred-and-one symptoms of being an internet addict: 206. You religiously respond immediately to e-mail, while ignoring your growing pile of snail mail. /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/20220308194413.7925E1C0A2F%40moolenaar.net.