|
|
|
|
|
by jeffbee
2217 days ago
|
|
I recently had this debate in a professional context. My correspondent argued that string was good for filenames, because it's a human-readable string. I pointed out all the different ways that a filename (on a variety of platforms!) can be constructed such that it will not conform to utf8. In a new system I would want to see an iron-clad reason for string in this case, because it's not obviously correct and the efficiency story isn't on the side of string, either. Luckily you can change from string to bytes at any time, since the wire format is the same, so this isn't the kind of mistake that gets cast in stone. |
|