[mercury-users] string_stream impl, re: redirecting output to streams

Ian MacLarty maclarty at cs.mu.OZ.AU
Thu Feb 16 09:09:15 AEDT 2006


On 15 Feb 2006, at 22:08, Peter Hawkins wrote:

> Hi...
> Ian MacLarty wrote:
>
>>
>> 4.  implement other useful streams such as string buffers, sockets, 
>> etc.
>>
> On this note I feel there is a big need for binary string support 
> (strings with null bytes). It's difficult to do meaningful binary 
> string buffer operations with the current (null-terminated) string 
> library. I hacked up a quick and dirty binary string library which 
> uses strings with an explicit length, but I think the right thing to 
> do is to change the standard string library to operate this way. Any 
> objections, in principle?
>

Not in principle, but I think you might have problems with the C code 
that ultimately does things with the strings (for example instead of 
passing the string to printf to write it out, you'd have to have extra 
code to handle nulls in the string which might be an efficiency 
problem).

Ian.

--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list