[mercury-users] string append

Ralph Becket rbeck at microsoft.com
Wed Aug 2 00:59:48 AEST 2000


> From: Michael Day [mailto:mcda at students.cs.mu.oz.au]
> 
> is use of the + operator to append strings considered poor 
> coding style?
> If not, could this (or any functional form, really) be added 
> to string.m?

(1) I suggested this a while back and properly got my head
bitten off.  + is typically commutative whereas string 
concatenation isn't.  Hence ++ in Haskell (I'd like to see
this as an operator in Mercury too, for list__append/2 and
string__append/2 and ... - anybody want to hack it into the
parser?)

(2) As Robert points out, func string__append/2 already exists,
as does func list__append/2.   XXX For some reason (I think it's
because they're declared in implemetation sections naughtily
appended to the main implementation sections) the declarations
don't turn up in the automatically generated documentation.

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