Quote:Original post by cache_hit
For what it's worth, this is one of the many things about Java that make me hate with a passion reserved for few things in life.
How simple is it in practically every other language in the world to write a function that returns multiple values? For example, suppose you have some item cache and for speed you want to write a TryGet function that if successful returns true as well as the item, and if failed simply returns false? Simple in every language in the world except Java. In Java you have to do something crazy like create a new class just for the return value, like:
*** Source Snippet Removed ***
Really??? Just return null - it's just as easy to check for null as for false.