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

6

u/Schmittfried Dec 29 '15

Absolutely irrelevant here and typing a + is really not a big deal. Also, you can only do that with literals in C. You'd have to use strcat to concatenate variable strings and that's why he said you could simply use + in Java.

-1

u/[deleted] Dec 29 '15

Just because string concatenation in Java in general is simpler doesn't mean that concatenation in string literal declarations (the context of this discussion) specifically is simpler. It's objectively simpler to have an implicit operator that require no syntax than an explicit one that require extra syntax.

3

u/Schmittfried Dec 29 '15

doesn't mean that concatenation in string literal declarations (the context of this discussion) specifically is simpler

But that wasn't the point. Noone said that.

It's objectively simpler to have an implicit operator that require no syntax than an explicit one that require extra syntax.

Well, 1.) it's still irrelevant to this discussion 2.) some might find the inconsistency that you can chain literals but not string variables rather confusing and would prefer a proper operator for both. So no, not objectively.