Re: when will Tuple be std?
- From: Mark Space <markspace@xxxxxxxxxxxxxx>
- Date: Fri, 28 Dec 2007 16:54:21 GMT
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.
.
- References:
- when will Tuple be std?
- From: apm35
- when will Tuple be std?
- Prev by Date: Re: Help with packages getting started
- Next by Date: Re: question about the toString Method
- Previous by thread: Re: when will Tuple be std?
- Next by thread: Help with packages getting started
- Index(es):
Relevant Pages
|
|