2 ms·
It's not even convenient. Strings are one of the biggest scourges of any programming language out there. Giant mess in basically every language until Java got i
by revelation 10y ago
It's not even convenient. Strings are one of the biggest scourges of any programming language out there. Giant mess in basically every language until Java got it somewhat right, and even then don't forget your equals...
C# (.NET) could be the forerunner if only they had not gone with UTF16, but then it's only with hindsight that we can point out UTF8.
- Retra 10y agoStrings are only a problem because they are being treated as text. In this case, they would simply be treated as binary identifiers, so there is no problem. The raw bytes would do just as well for this kind of thing.
- jmiserez 10y agoOnly if they are fixed length. If you used variable length strings in packet headers things would get complicated. But if you're fine with fixed-length strings, you could just as well use all those bits to represent a number instead.