Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!rochester!bullwinkle!batcomputer!garry From: garry@batcomputer.TN.CORNELL.EDU (Garry Wiegand) Newsgroups: net.lang.c++ Subject: Wish List Message-ID: <429@batcomputer.TN.CORNELL.EDU> Date: Thu, 20-Mar-86 18:05:33 EST Article-I.D.: batcompu.429 Posted: Thu Mar 20 18:05:33 1986 Date-Received: Sat, 22-Mar-86 22:32:09 EST Reply-To: garry%geology@cu-arpa.cornell.edu.arpa Distribution: net Organization: Cornell Engineering && Flying Moose Graphics Lines: 23 As long as we're adding amenities to the language, I have a small wish... All the binary operators in C have a "please modify" form: i = i + 3; --> i += 3; Why don't the unary operators have one as well? In particular, I sometimes write loops in which a logical or bit variable oscillates on and off, using either foo = ~foo or foo = !foo. Would it be more pleasing to the eye to have: foo = ~foo; --> ~~foo; /* Means: please bitwise-complement foo */ foo = !foo; --> !!foo; /* Means: please logically-complement foo */ I suppose foo!! and foo~~ should be provided too, for the sake of symmetry with ++ and --. Of course, screwily written (macros without proper parenthesizing, for example) existing programs would break. But fortunately there isn't much extant C++ yet. Just a thought - garry wiegand garry%cadif-oak@cu-arpa.cs.cornell.edu