Arne Goedeke wrote:
Maybe a better strategy would be to introduce a new type of buffer object (supported by the get_memory_object_* APIs) which can be used to (cheaply) carry some arbitrary binary data. That is in principle already supported by Stdio.File()->write().
Well, three things come to mind:
a. The Shuffler was broken so much that any practical use of it was impossible until I fixed it in 8.1 around a year ago, so that means that any backward compatibility with its API could be disregarded.
b. Using a Stdio.Buffer or memory object with the write method on the shuffler target will break the shuffler on targets that only support writing strings.
c. I don't think there is a clever way to detect if the target supports Stdio.Buffer/memory objects without triggering an exception (which probably is too much of a performance hit). So it would require changing the API to require support to write Stdio.Buffer/memory objects for shuffler targets.
Thoughts?