Re:Show HN: Hexi – Modern header-only network binary seriali...
by connicpu on Friday March 28, 2025 @03:31PM
(#43509129)
I know it's a convention since the inception of the language, but the operator overload abuse of the bitshift operator still makes me sad every time I see it :(
[ Parent
| on HN ]
Re:Show HN: Hexi – Modern header-only network binary seriali...
by Chaosvex on Friday March 28, 2025 @03:33PM
(#43509147)
On the plus side, it's optional. The same thing can be achieved with put()/get() equivalents.
Re:Show HN: Hexi – Modern header-only network binary seriali...
by bluGill on Friday March 28, 2025 @04:49PM
(#43509690)
You are not alone. many on the standard committee are trying to get rid of it. std::print is the new way to do io instead of cout in part so you don't have to abuse shift for io. This is new in c++23 though so few people know about it.
Bjarne appears to prefer cout though, so it isn't universal.
Re:Show HN: Hexi – Modern header-only network binary seriali...
by soursoup on Friday March 28, 2025 @05:57PM
(#43510243)
Danish Bjarne may have his < right next to lshift. He needs to use shift+. to enter colon.
On US layout colon is a single keypress but < is shift+.
This may explain the discrepancy.
—- from someone who read Bjarne at 16yo. All hail the Bjarne