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

The comparison of Ruby's Hash and Array classes to Java's collections API is not very relevant - first of all, the graph is from 1999 (there are more classes now), and secondly, Java's collections API does cover quite specific use cases which Ruby's Hash and Array classes don't (e.g. concurrent access.)

In Java, you could also always use List or HashMap without thinking about Sets, Trees, or weak references, but that's not the point; the Java collections API isn't an alternative to 'should I use Hash or Array', the use cases for the two APIs are completely different.



Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: