Xref: utzoo comp.lang.c:7255 comp.lang.c++:797 Path: utzoo!utgpu!water!watmath!clyde!burl!codas!ateng!chip From: chip@ateng.UUCP (Chip Salzenberg) Newsgroups: comp.lang.c,comp.lang.c++ Subject: Re: Power (Re: all those :-) Message-ID: <187@ateng.UUCP> Date: 11 Feb 88 18:19:04 GMT References: <302@Aragorn.dde.uucp> <7139@brl-smoke.ARPA> <3461@ihlpf.ATT.COM> <3521@ihlpf.ATT.COM> <744@PT.CS.CMU.EDU> <132@ghostwheel.UUCP> Reply-To: chip@ateng.UUCP (Chip Salzenberg) Followup-To: comp.lang.c++ Organization: A T Engineering, Tampa, FL Lines: 32 In article <132@ghostwheel.UUCP> ned@ghostwheel.aca.mcc.com.UUCP (Ned Nowotny) writes: >In article <744@PT.CS.CMU.EDU> edw@IUS1.CS.CMU.EDU (Eddie Wyatt) writes: >>Why not? why not have an extendable language, where the user is free to >>define his own infix operators? > >In some sense, C++ has this (mis-)feature -- operator and function overloading. > >Unfortunately, not all programmers seem to agree on what constitutes a good >use of operator overloading. I have seen code which overloaded "+" and "-" >to add and remove, respectively, an object from a set of objects. > >do_something(); >A + B; >do_something_else(); > >That's right. It looks like a useless expression, but its not. And I have seen code where "read()" writes and "write()" reads. So what? The programmer should have defined "+=" instead of "+". So fire the programmer; don't hobble the other programmers by restricting their power of expression. >Of course, it can be argued that the misuse of a feature by a programmer is >no excuse for blaming the feature. I couldn't agree more. :-| -- 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."