Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!ames!lll-lcc!lll-winken!uunet!steinmetz!ge-dab!codas!ateng!chip From: chip@ateng.UUCP (Chip Salzenberg) Newsgroups: comp.lang.c++ Subject: Re: Operator overloading considered harmful Message-ID: <152@ateng.UUCP> Date: 18 Jan 88 14:51:40 GMT References: <240@vsi1.UUCP> <4538@watdragon.waterloo.edu> <281@bernina.UUCP> Reply-To: chip@ateng.UUCP (Chip Salzenberg) Organization: A T Engineering, Tampa, FL Lines: 21 In article <281@bernina.UUCP> marti@ethz.UUCP (Robert Marti) writes: >Personally, I think the (more restricted) form of overloading you get >by subclassing and inheritance is all you really need. The argument >for operator overloading -- namely that it is nice to use an operator >such as + for adding complex numbers, vectors, etc -- is just not >good enough for me. After all, this is just syntactic sugaring! Let us _not_ fall into the language wars again! No feature of C++ which is not present in C is "needed" in the sense of being indispensible. Otherwise, C would be useless, and we all know that it isn't. :-) Operator overloading is not necessary. Neither are classes nor function overloading nor inline functions. They are nice and they are useful, when used properly. C++ is an industrial-strength language. What some people seem to forget is that industrial-strength means "not safe for pets and small children." -- Chip Salzenberg UUCP: "{codas,uunet}!ateng!chip" A T Engineering My employer's opinions are a trade secret. "Anything that works is better than anything that doesn't." -- me