Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In my early days - I once found a Tuple library for Java, and added it to the codebase. Senior devs soon instructed me to remove it - Back to a multitude of container objects...


Hard to say without knowing more context, but they could have been right. Personally I'd prefer clearly named, domain-specific container objects with adequately named properties than having to deal with "anonymous" Tuples all over the codebase, and being forced to remember what the first element was, what the second one was etc.


What makes a container object domain-specific? If I just have to pass data through the application, the anonymity may be appropriate.


Wouldn't using a tuple in Java be like using inserting things into a Object[] and pulling them back out casting to the object you want to use?

What library was this?





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: