Re: Using `string` vs `seq[uint8]` for non-text data
Yes, use `seq[byte]` already.
Re: Using `string` vs `seq[uint8]` for non-text data
Sorry to be a bit of a pest, but I want to know if this is the thing I should be doing or not for my Nim code now?
Re: Using `string` vs `seq[uint8]` for non-text data
Okay, that sounds better to me. So for in my case with my stb_image wrapper, should I switch the API now to use seq[byte] or should I hold off on it for a little longer?
Re: Using `string` vs `seq[uint8]` for non-text data
> In the issue ticket I linked, Eduardo Bart mentioned that int the Nim > codebase that string is also used as a buffer (instead of a seq[uint8]), e.g. > readFile() and writeFile(). Where even the data those procs could be > returning binary and not text. That is correct. But in the longer term we'll be forced to use `seq[byte]` more and more. The reason? Often the serialization format (JSON) distinguishes between Unicode text and bytes.