Hacker News new | ask | show | jobs
by Dylan16807 4 hours ago
What kind of person understands and needs bitwise operators but can't easily remember & | ~ and the arrows for shift? It's very little information.

The part I'd call a hassle is the different kinds of right shift but you have that same hassle if you use keywords.

I like using the and/or keywords for logical operations. Now let's make bitwise look significantly different from that.

1 comments

It's not about having to remember them, it's that you shouldn't waste these short single symbols on operations that are only rarely used.

This stuff (especially the ternary) are a step backwards. There is just no reason to waste | on a bitwise or that gets used at 1% of the frequency of the standard or. In the future you might have a better use for it (pipeline syntax, sum or union types come to mind in other languages).

I dislike basically everything about these syntax extensions.