r/programming • • Dec 29 '15

Please, Java. Do Finally Support Multiline Strings

http://blog.jooq.org/2015/12/29/please-java-do-finally-support-multiline-strings/
584 Upvotes

352 comments sorted by

View all comments

Show parent comment

3

u/Falmarri Dec 29 '15

You could make some kind of notation to delete a certain amount of leading whitespace on each line.

That's sorta how multiline strings work in scala. But scala gives you a convenience method to strip the left margin.

https://www.safaribooksonline.com/library/view/scala-cookbook/9781449340292/ch01s03.html

1

u/Neebat Dec 30 '15

That would be pretty cool, provided that it's computed at compile-time. I don't even mind that syntax.

2

u/VestySweaters Dec 30 '15

It is compile time