Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!stealth.acf.nyu.edu!brnstnd From: brnstnd@stealth.acf.nyu.edu Newsgroups: comp.lang.c Subject: Re: Personal dialects and C++ overloading Message-ID: <3416:03:41:16@stealth.acf.nyu.edu> Date: 14 Feb 90 03:41:17 GMT References: <5940014@hpcupt1.HP.COM> <33889@ucbvax.BERKELEY.EDU> <1922@gmdzi.UUCP> < <1990Jan29.210357.366@eng.umd.edu> <90029.194640JI8@PSUVM.BITNET> <4152@helios.TAMU.EDU> <926.18:17:58@stealth.acf.nyu.edu <1990Feb9.1 Reply-To: brnstnd@stealth.acf.nyu.edu (Dan Bernstein) Distribution: usa Organization: IR Lines: 22 In article <1990Feb9.181111.24546@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes: > In article <926.18:17:58@stealth.acf.nyu.edu> brnstnd@stealth.acf.nyu.edu (Dan Bernstein) writes: > >Overloading saves typing time. It has no other advantages... > Sorry, I can't go along with that. Saving typing time by itself is not > of massive importance, but shorter programs are. True. But do you really find that typing foo instead of library.foo (or whatever your overloading language allows) makes your programs shorter? Narrower, maybe, but that doesn't aid reading or comprehension. > Operator overloading is desirable and useful, but placing some > more constraints on it might be desirable. Yeah. I probably wouldn't mind overloading if it had to have a special syntax and if I could coax my editor into un-overloading (underloading?) all overloaded operations. If Ada abbreviated lib1.lib2.foo as .foo or lib2.foo rather than foo or lib2.foo, it might even be readable---the initial period would serve as an ``overload warning'' and wouldn't be too distracting. C++ doesn't have such simple syntax but the same idea would work. ---Dan