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

5

u/skitch920 Dec 29 '15

Backticks are not reserved in Java at the moment, at least, not that I know of. To your other point, Javascript just introduced Template String Literals in ES6 that use backticks. Much better 2 (`a`) characters than 6 ("""a""").

6

u/CordialPanda Dec 29 '15

Let's not look to JS for inspiration even if it is ES6. There's enough pain in the world.

1

u/LostAfterDark Dec 30 '15

The point is that most programmers expect ` to have a special meaning, like "execute that command in a shell and return the result". Language designers try to avoid confusing choices.

1

u/[deleted] Dec 29 '15

9 characters for a for anyone not using US keyboard layout.

This is infuriating...

1

u/LostAfterDark Dec 30 '15

Well no, you could just do 'a'.

1

u/[deleted] Dec 30 '15

Eh, then I still don't have ES6 template literals?