Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #6802

Re: looping through a list, starting at 1

Date 2011-08-05 10:09 +0100
From RedGrittyBrick <RedGrittyBrick@spamweary.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: looping through a list, starting at 1
References (4 earlier) <9a04aaFp76U1@mid.individual.net> <j1eoba$uj6$1@dont-email.me> <Q7Odnef35YdGmqbTnZ2dnUVZ_qWdnZ2d@earthlink.com> <j1f3ds$d7i$1@dont-email.me> <5-SdnQLc1oSKjqbTnZ2dnUVZ_vOdnZ2d@earthlink.com>
Message-ID <4e3bb343$0$2491$db0fefd9@news.zen.co.uk> (permalink)
Organization Zen Internet

Show all headers | View raw


On 04/08/2011 22:46, Patricia Shanahan wrote:
> On 8/4/2011 2:36 PM, markspace wrote:
>> On 8/4/2011 1:58 PM, Patricia Shanahan wrote:
>>> On 8/4/2011 11:27 AM, markspace wrote:
>>>> On 8/4/2011 10:47 AM, Chris Riesbeck wrote:
>>>>> In C++, an
>>>>> overloaded postfix ++
>>>>>
>>>> See? This is why I'm against any kind of operator overloading in Java.
>>>> Too much stupid out there.
>>>
>>> So what operator should have been used for String concatenation, instead
>>> of overloading "+"?

We could use '.'

Then we could use '->' for method invocation.

And '::' for class namespace separators (or whatever they are called).

;-)

>> I think the obvious interpretation of my comment should be "user defined
>> operator overloading."
>>
>>
>
> Why should the appropriateness of an operator overloading be affected by
> who did it?

It shouldn't but I imagine markspace's objection might have been that 
whilst we all learn about the varied uses of '+' at the start of 
learning Java, I expect it can be a little perplexing when you encounter 
a '+' that makes no sense until you find where the original programmer 
defined an overload of that operator. Even worse might be a '+' that 
apparently makes sense but where you do not realise that the operator 
has been overloaded. Is this possible?

-- 
RGB

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: looping through a list, starting at 1 Roedy Green <see_website@mindprod.com.invalid> - 2011-08-03 15:40 -0700
  Re: looping through a list, starting at 1 Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-08-03 20:53 -0300
  Re: looping through a list, starting at 1 Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-08-03 21:10 -0400
    Re: looping through a list, starting at 1 Gene Wirchenko <genew@ocis.net> - 2011-08-03 21:22 -0700
  Re: looping through a list, starting at 1 "John B. Matthews" <nospam@nospam.invalid> - 2011-08-03 23:36 -0400
    Re: looping through a list, starting at 1 RedGrittyBrick <RedGrittyBrick@spamweary.invalid> - 2011-08-04 09:37 +0100
      Re: looping through a list, starting at 1 Chris Riesbeck <Chris.Riesbeck@gmail.com> - 2011-08-04 12:47 -0500
        Re: looping through a list, starting at 1 markspace <-@.> - 2011-08-04 11:27 -0700
          Re: looping through a list, starting at 1 Patricia Shanahan <pats@acm.org> - 2011-08-04 13:58 -0700
            Re: looping through a list, starting at 1 markspace <-@.> - 2011-08-04 14:36 -0700
              Re: looping through a list, starting at 1 Patricia Shanahan <pats@acm.org> - 2011-08-04 14:46 -0700
                Re: looping through a list, starting at 1 RedGrittyBrick <RedGrittyBrick@spamweary.invalid> - 2011-08-05 10:09 +0100
                Re: looping through a list, starting at 1 Gene Wirchenko <genew@ocis.net> - 2011-08-05 14:46 -0700
            Re: looping through a list, starting at 1 Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-08-04 20:51 -0400
              Re: looping through a list, starting at 1 Tim Slattery <Slattery_T@bls.gov> - 2011-08-05 08:38 -0400
          Re: looping through a list, starting at 1 Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-08-05 10:22 +0000
  Re: looping through a list, starting at 1 Lew <lewbloch@gmail.com> - 2011-08-10 09:05 -0700

csiph-web