[mercury-users] string__first_char

Richard A. O'Keefe ok at atlas.otago.ac.nz
Tue Oct 17 08:36:41 AEDT 2000


I wrote:
	> More to the point, working with strings is a mistake in any programming
	> language.  Strings are the ultimate data UNstructure.  The only thing they
	> are really good at is holding uninterpreted data that you are going to hand
	> straight back to the source you got it from.
	
Michael Day replied:
	How about holding uninterpreted data that you are going to attempt to
	interpret? :)
	
Stream --[interpretation]--> Data Structure --[processing]-->
Other Data Structure --[formatting]--> Stream.

If one is getting data from a source (maybe a data base interface, maybe
some existing C package) that already has the data in a C string, it's a
good idea to leave it there and erect a stream on it (at least Chris Torek's
snprintf() made it into the C99 standard; I wish his interface for building
memory-based streams had).

--------------------------------------------------------------------------
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