Hi, On Thu, May 19, 2022 at 2:19 PM Bram Moolenaar <[email protected]> wrote: > > > > 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. >
I have updated the PR to implement the bitwise right (>>) and left shift (<<) operators. - Yegappan -- -- 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/CAAW7x7mG0Xy6tsSLtXgnmmmdg6Qo%2Bqy2L8o3ACpPZ1qm3wBitA%40mail.gmail.com.
