4 ms·
> Some of you would be ashamed of the choices you make in typed languages... Any examples?
by gitgud 6y ago
> Some of you would be ashamed of the choices you make in typed languages...
Any examples?
- SV_BubbleTime 6y agoSure. I’m working on an IoT-like product. I have extremely limited resources. A serialized packet going to the server can be no more than 20 bytes in this case, it needs to fit in a default size single BLE packet. My app developers came back with a message ID field that uses a UUID. A 256bit store, 16 of my possible 20 bytes. The whole packet as they designed it was only 6x larger than could possibly fit. They used int... not having any idea what a int64_t was or that because the value could only ever be 0-20 that a uint8_t was most appropriate. Oh but the language they’re using doesn’t have 8bit ints I guess so then it was a discussion of “what is but shifting” and who even uses this weird operator >> and << !? I have a hundred examples of the above. Embedded is a different world, I consider that “how computers work” territory.