5 ms·
Pascal strings have overhead of 2 ints per string (16 bytes on 64-bit systems) The kind of person who calls a single pass through the string a "horribly ineffi
by theamk 2y ago
Pascal strings have overhead of 2 ints per string (16 bytes on 64-bit systems)
The kind of person who calls a single pass through the string a "horribly inefficient solution" will faint at the idea of burdening every string with 16 more bytes of data.
- wruza 2y agoThis is a purely psychological problem. I’d say most of C is psychological, not technical. If I were a world dictator, one of my first orders was to lock C developers in a room with only python for few months. Or ruby, in severe cases. Some of them really need to touch grass.
- mbivert 2y ago> If I were a world dictator, one of my first orders was to lock C developers in a room with only python for few months. Or ruby, in severe cases. I would additionally do the exact opposite: lock Python & Ruby developers in a room with only C for a few months. C is a great language to learn programming, but Python or Ruby are, nowadays, in the most cases, better languages to program with. For example, C's sharpness is a notoriously famous source of bugs; yet it forces to develop rigor, discipline.
- tmtvl 2y agoBut if you only give them a few months that's barely enough time to run a simple Hello World.
- adgjlsfhk1 2y agoit's pretty trivial to implement this as a max of 14 byte overhead (with small string optimization), but more importantly, it's only 16 bytes on 64 bit systems, which pretty much by definition aren't that memory constrained (since otherwise you would be on 32 but).
- aidenn0 2y ago> ...it's only 16 bytes on 64 bit systems, which pretty much by definition aren't that memory constrained (since otherwise you would be on 32 but). I'm not sure about that. There are plenty of 64-bit systems with less than 4GB of RAM
- pjmlp 2y agoFor some reason Multics got a higher security score from DoD than UNIX, guess why.