Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: Java blunders Date: Sun, 27 Jul 2014 18:28:44 +0000 (UTC) Organization: A noiseless patient Spider Lines: 43 Message-ID: References: <53cef75d$0$291$14726298@news.sunsite.dk> <7s6vs9p395bretqrtdvh9i6til83vfk52p@4ax.com> <53d04b5f$0$291$14726298@news.sunsite.dk> <53d19752$0$295$14726298@news.sunsite.dk> <7lcat9t8j6tuo1v2tm1od8rhvhcgf5i7g9@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 27 Jul 2014 18:28:44 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="e5160e2be48f1ea550cf61512446f525"; logging-data="10827"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Y37PFReHSo9xBGGxAYjhEZos/dS0N4WM=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:agVy/ts/OEWsC5Bh9b658IVZMiQ= Xref: csiph.com comp.lang.java.programmer:29367 On Sun, 27 Jul 2014 10:13:16 -0700, Roedy Green wrote: > On Sat, 26 Jul 2014 20:11:24 +0000 (UTC), Martin Gregorie > wrote, quoted or indirectly quoted > someone who said : > >>Perl and PHP use . as the string concatenation operator. It seems as >>good as any to me: > > I wonder if . would conflict with its use in qualification. > That's possible. Perl side-steps it by using -> as its qualifier, quite possible because by the time Larry Wall felt to need to extend Perl to handle the equivalent of C structs or Java classes the '.' was already being used as the string concatenation operator. With all the problems around thinking up intuitive and preferably very short symbols to represent a growing number of operators I'm getting more and more inclined to think that the Algol 68 authors were on the right track with their approach of allowing a programmer overload any operator he wanted to provided there wasn't a pre-existing example on the A68 equivalent of the class-path. > I used a language many years ago, that used space as the concatenation > operator. Does anyone remember what it was? SNOBOL? > > It made for very readable code. > Same applies to operator overloading: given a CurrentAccount object ca and a Payment object p there 's little or no difference in clarity between writing ca.acceptPayment(p); and ca += p; -- martin@ | Martin Gregorie gregorie. | Essex, UK org |