2 ms·
This has nothing to do with Java. I thought the same thing until I started working for Google. There, I saw correctly designed APIs that are pleasant to use,
by jrockway 15y ago
This has nothing to do with Java. I thought the same thing until I started working for Google. There, I saw correctly designed APIs that are pleasant to use, all while still being standard Java.
As an example, with Google's collection library (Guava), you might create a set like:
import com.google.common.collect.ImmutableSet;
ImmutableSet<Foo> foos = ImmutableSet.of(bar, baz, quux);
This is simple syntax for a simple operation, which is the point of libraries.
(Goldman also has a lot of mutable data structures. I don't think I've used or created a mutable data structure at Google ever :)