> > it appears all the popular languages use ">>" and "<<" operators > > Java uses `>>>` and `>>` which has different behavior for the bit sign. > https://docs.oracle.com/javase/tutorial/java/nutsandbolts/op3.html > > Something to consider if Vim script has bit shift operators.
This stems from when it was "cheaper" to keep the top bit (the sign bit for signed integers). In my opinion it is almost never what you want, except when you want the last 1% of performance. In practice you need to add an "unsigned" typecast in some languages, which is confusing. Since bitwise operators should not care about a sign bit, I would very much prefer ">>" to just make the topmost bit zero. No need for ">>>" then. -- hundred-and-one symptoms of being an internet addict: 236. You start saving URL's in your digital watch. /// 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/20220519211906.8E19D1C05B5%40moolenaar.net.
