I would structure the book by task, showing how different languages would
implement the same task.

For example,

using a marc parsing library in java, groovy, python, ruby, perl,
c/c++/objective c, Haskell.

Implementing same.

Using a rest API

Implementing a rest API

Doing statistical analysis of catalog records, circulation data , etc.

Doing knowledge based analysis of same
Treatment of each topic and language is likely to be cursory at best, and I
am not sure who the audience would be.

A series of  "<language> for librarians" books would seem more useful and
easier to produce.