From: Andreas Leitgeb on 16 Feb 2010 09:22 Eric Sosman <esosman(a)ieee-dot-org.invalid> wrote: > On 2/15/2010 6:47 PM, Lew wrote: >> Eric Sosman wrote: >>> When I actually want the value of the expression, I write >>> whichever I need (usually a[x++] or a[--x]). When all I want >>> is the side-effect, I write ++x because "increment x" seems to >>> read more smoothly than "x increment." >> Which effect is the "side" effect? Isn't incrementation a primary effect >> of the "increment" operator? > The "side effect" is the storing of a new value in x. > JLS Chapter 15, first sentence: The philosophy of calling even the primary purpose of an idiom a "sideeffect" likely comes from functional languages, where the direct effect is by definition only the returned value. Outputting something to an OS-channel or bytearray is also just the (typical) sideeffect of the write/print*-methods in OutputStreams and Writers.
From: Arne Vajhøj on 16 Feb 2010 20:25 On 16-02-2010 12:00, Mike Schilling wrote: > Thomas Pornin wrote: >> (In C++ with their overloading of operators with arbitrary code, the >> situation could be different. In a way, in the presence of overloading >> and complex classes, the "result" of x++ is always used, at least >> implicitely.) > > That is, it's always computed, whether it's used or not. At least if it is compiled separately. With inline code a good optimizer may have a chance. Arne
From: Roedy Green on 17 Feb 2010 00:46 On Mon, 15 Feb 2010 09:35:27 +0100, Lars Enderin <lars.enderin(a)telia.com> wrote, quoted or indirectly quoted someone who said : >No, the text is not thin, it's just faint, with low contrast, but >readable. It looks almost transparent, which is what you asked about >initially. Could you please email me a screen shot. Also run http://mindprod.com/applet/fontshower.html And send me the list of fonts you have installed. or if you are feeling brave, fiddle with mindprod.css and jdisplay.css till you figure out just what in them in causing the strange rendering. -- Roedy Green Canadian Mind Products http://mindprod.com Nothing has really happened until it has been recorded. ~ Virginia Woolf (born: 1882-01-25 died: 1941-03-28 at age: 59)
From: EJP on 17 Feb 2010 01:59 On 16/02/2010 9:48 AM, Arne Vajhøj wrote: > I know, but the ++something is better than something++ > because it is faster is rooted in C++ classes I believe. It is rooted in the PDP-11 and Vax architectures, which had pre-increment and post-decrement instructions, but not vice versa.
From: Robert Klemme on 17 Feb 2010 02:05
On 02/15/2010 10:32 AM, Andreas Leitgeb wrote: > Lew <noone(a)lewscanon.com> wrote: >> The matter of the existence or not of a shorthand combining operator >> is a red herring. > > Java programming must really stink to you, with all those red herrings. I would be surprised to learn that. Why else should Lew do Java programming and post so frequently here? In fact, I suspect he does not only like Java programming but also a good argument once in a while. ;-) Whenever I look, there is almost certainly a profound posting by him in c.l.j - although I would concede that some might have to adjust to his style of writing. :-) Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ |