Sometimes a simple question can spark a surprising insight. Like this one: Why do Java's text block start with """ *and* a newline?! 🤔 I didn't know, so I asked and got some good insights straight from the inside - here they are. 🧵 1/6
3
20
84
0
14
As JEP 378 (openjdk.java.net/jeps/378) makes abundantly clear, text blocks are not just about texts but also about languages like HTML, XML, SQL, JSON, etc. - text blocks want to make it easier to embed them. 2/6
@nipafx @JornVernee Another way to think of this is that the design center for text blocks is *two dimensional string literals*.
@nipafx @lukaseder Great explanation! Thanks for putting it together. TIL