1.92K subscribers
3.67K photos
138 videos
15 files
3.86K links
Блог со звёздочкой.

Много репостов, немножко программирования.

Небольшое прикольное комьюнити: @decltype_chat_ptr_t
Автор: @insert_reference_here
Download Telegram
#prog #article

ntoh*/hton* is a bad API

But my point is not to bash C.

My point is that this API quirk fundamentally changes how people think about endianness, making them commit mistakes they wouldn’t make otherwise. Many people think integers have an intrinsic endianness, or prefer textual formats to seemingly avoid dealing with endianness, and I have held all these convictions myself at some point.

It’s not that people are stupid. It’s borderline impossible to make the same mistakes if you treat endianness as a parameter of a serialization format. But C doesn’t want you to think about it this way, and so you never realize you were lied to until you get a reason to think hard about it.
🔥6👍3👏1🤡1
Немного поздно, но: я недавно впервые получил деньги за вождение ролёвки
👏13👍3👌1🤡1
🍌136🤔2😁1💩1
👍5🤡4🌚32😁2