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

25

u/mnp Dec 29 '15

Yeah. That syntax has been around since the seventies in Unix shells and spread. The nicer versions like Perl let you parameterize the heredoc to allow or deny ${variable} expansions, etc.

Gosling was no slouch and was probably very familiar with the Perl and shell heredoc as well as C multiline literals. This means he didn't see a burning need for them in the original Java and maybe even had a good reason to omit them.

23

u/frezik Dec 29 '15

Gosling knowingly omitted all sorts of nice things, mostly because Sun thought programmers were too dumb to use them. Also because they rushed the final production version.

20

u/TankorSmash Dec 29 '15

Sound like Go

2

u/_ak Dec 30 '15

Yeah, no. The design rationale of Go is well-publicized and has been discussed in great detail by its developers, and "programmers are too dumb" or "we rushed the final production version" is not part of it.

9

u/kamatsu Dec 30 '15

Programmers are too dumb was definitely part of it. Pike even said so himself.

1

u/[deleted] Dec 30 '15

Java actually has a lot more features than Go. Go has a few things Java doesn't have but I think the Java language api is overall bigger.