Re: when will Tuple be std?



apm35@xxxxxxxxxxxxxxxxxx wrote:
I am an experienced C++ programmer who has just recently started
learning java. In C++ there is a type std::pair for an aggregate
consisting of a first element and second element. There are moves to


The problem with tuple is, in my opinion, that once you have tuple, why not a triple or a quadruple? Those are just as often used. And once you start thinking along these lines, it becomes obvious (again imo) that arrays or ArrayList or other Collection is easier and already present.

Plus as Lew pointed out making a new type of object is almost trivial. I've made a special purpose triple but never a tuple, so tuple wouldn't help me. If it's truly quick and dirty I skip the nice getters and setters and just make the instance variables public.
.



Relevant Pages

  • Re: Names in pre=Norman times
    ... great variation in the spelling of names. ... Beorht- will be used as a first element. ... -berht is to be preferred as a second element for English names ... Eald- (exception Aldhelm?) ...
    (soc.genealogy.medieval)
  • Re: one line sorting
    ... first element. ... After that I need to start from the second element, ... lowest element, replace it with that second element and so on till I reach ... I don't know how this sorting algorithm is called? ...
    (comp.lang.ruby)
  • RE: Names in pre=Norman times
    ... Beorht- will be used as a first element. ... -burg rather than ?burh should be used as a second element for female ... Eald- (exception Aldhelm?) ...
    (soc.genealogy.medieval)
  • How can I recognise a <BR>
    ... I would like the first line of my string in the first element of the ... array, the second line in the second element and so on... ...
    (comp.lang.php)
  • Re: Reading values from text file (newbie warning)
    ... Then the first element of the string will be everything up to the first;, the second element will be what's between the first and second semi, etc. ... I don't know expect well, but I suspect that since you're not getting the echoed back results to the command prompt when you run it as a script, you're not seeing it in expect_out. ...
    (comp.lang.tcl)