Comment

Comment by kilink

I like Clojure quite a bit more than Java, but some of these are unfair if you are comparing against modern Java.

For instance, the sorting example can be simplified:

    Comparator<User> userOrdering = Comparator.comparing(User::isSubscription).thenComparing(User::getName);
    // forward sort
    Collections.sort(users, userOrdering);
    // reverse sort
    Collections.sort(users, userOrdering.reversed());
A lot less verbose than it's made out to be.
parent kilink 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton