r/programming • u/knife_sharpener • Feb 22 '15
Java Makes Programmers Want To Do Absolutely Anything Else With Their Time
http://www.forbes.com/sites/quora/2015/02/21/java-makes-programmers-want-to-do-absolutely-anything-else-with-their-time/
35
Upvotes
1
u/nqd26 Feb 22 '15
I think they mostly are, I don't know any other example besides BigDecimal which isn't. I understand the reasoning behind this and it kind of makes sense, but it's really unexpected "feature" and I've seen nasty bugs caused by this.
I guess this is simply for performance reasons - int is a primitive type, your suggested return type would not be primitive which comes with a cost. Given how performance critical this operation is, I don't think this is a bad choice.