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

  • 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)
  • 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)
  • Re: How can I recognise a <BR>
    ... >This property forms a three bedroom detached villa. ... >an unfurnished basis. ... >I would like the first line of my string in the first element of the ... the second line in the second element and so on... ...
    (comp.lang.php)
  • Re: Help about Matrix output
    ... I hope to extract a part of a big matrix based on certain ... e.g. if the first colum is less than the second ... I interpret you as saying that any row, in which the first element is not less ... than the second element, is to be deleted. ...
    (comp.soft-sys.matlab)