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

You don't need a dynamic language for that. In Java:

    Map<K,V> mkMap(int size) {
        return size > threshold ? new HashMap<K,V>() : new TreeMap<K,V>();
    }


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

Search: