logoalt Hacker News

gf000last Sunday at 8:28 PM1 replyview on HN

I think Java's solution is much cleaner.


Replies

IshKebablast Sunday at 9:44 PM

For those of us that haven't used Java for a decade...

> In text blocks, the leftmost non-whitespace character on any of the lines or the leftmost closing delimiter defines where meaningful white space begins.

From https://blogs.oracle.com/javamagazine/post/text-blocks-come-...

It's not a bad option but it does mean you can't have text where every line is indented. This isn't uncommon - e.g. think about code generation of a function body.

show 2 replies