How to send a string + string length on a stream?

This is surely more “Prolog like”. It is probably also faster for (very) short strings. On long strings using the NULL stream is much faster and uses no extra resources. The Quintus derived null stream is like Unix /dev/null implemented to either discard output or use the stream position information.