Closed davidyuk closed 1 year ago
No, it is not currently possible.
Originally strings used to be just "byte-arrays" but then it was important that they were interpreted as UTF8 (and thus not all byte-arrays are valid strings) - so we lost the generic byte arrays.
I'm curious if it would be possible to make compiler only changes that introduces arbitrary sized byte arrays. If time permits that might be something to look into.
To follow up, it is only possible to do a little bit without changing FATE - I'll see if I can make a suggestion for Ceres instead...
See #456
https://docs.aeternity.com/aesophia/v7.0.1/sophia_stdlib/#bytes I've found functions to convert bytes to int and string, but I can't find the reverse. Probably it is because int and string have dynamic size, but still. As a workaround, I've used strings to concatenate binary data.