This is not our isBlank example. It is pulled directly from the Apache Commons library. We use this example because it represents code that most Java programmers use on a day to day basis. It also helps make the reader aware of the many things that they need to keep track of (like branches, mutable state, and exit points) when they are programming in Java. We mention right before the example where the code comes from.

I suppose it’s the same argument for having the Person Java example full of getters and setters instead of being simply public fields. Getters and setters being the common way even though if a the Person class is considered only as a data structure, I’d be tempted to have it with public fields instead. Or use a Java Map, but then we’re back in verbose land 8)

I bought the first edition. Already defstruct was not considered best practice when I got that version. Second edition now is priced to me like a new book when I’m fairly sure it can’t be all new. People who bought the first edition should get some kind of price break, no?