home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!kronos.arc.nasa.gov!iscnvx!netcomsv!ulogic!hartman
- From: hartman@ulogic.UUCP (Richard M. Hartman)
- Newsgroups: comp.lang.c++
- Subject: Re: Overload operator to concatenate Strings?
- Message-ID: <629@ulogic.UUCP>
- Date: 18 Nov 92 00:35:17 GMT
- References: <1992Nov13.111415.1@happy.colorado.edu>
- Organization: negligable
- Lines: 17
-
- NIHCL uses the & operator, so at least there's precedent. I prefer '+'
- myself. To me a String is a String, and if it's underlying representation
- is "a vector of char" that is immaterial. (I mean, isn't that what this
- Object stuff is supposed to be about? :) Adding two Strings resulting
- in a single longer string seems perfectly reasonable to me. '&' is
- intuitive if you consider the common english usage for it, but I have
- the C usage (bitwise and) too firmly embedded in my mind for me to like
- it as the String concatenation operator. Using '||' (or '&&') would
- be right out. Since they have program flow uses that get lost if you
- overload them (if I understand the previous article correctly...)
-
- -Richard Hartman
- hartman@ulogic.COM
-
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- "186,000 mi/sec. Not just a good idea, it's the LAW!"
-
-