I'd like to share two nifty language implementation tricks I've come across recently. The first is about doing allocation safely and quickly. It's helpful to have read Atomic heap transactions and fine-grain interrupts as background, but the first paragra
// Convert elements to strings and concatenate them, separated by commas String joined = things.stream() .map(Object::toString) .collect(Collectors.joining(", "));
D. Pavlovic, P. Pepper, und D. Smith. Mathematics of Program Construction, Volume 6120 von Lecture Notes in Computer Science, Springer Berlin Heidelberg, (2010)