r/programming • • Jun 05 '18

Code golfing challenge leads to discovery of string concatenation bug in JDK 9+ compiler

https://stackoverflow.com/questions/50683786/why-does-arrayin-i-give-different-results-in-java-8-and-java-10
2.2k Upvotes

355 comments sorted by

View all comments

Show parent comment

-5

u/ShiitakeTheMushroom Jun 05 '18

Ah, thanks for the great info! I'm starting to feel as others in this thread do and we should just be avoiding pre/post incrementation operators as well as +=.

4

u/mirhagk Jun 05 '18

Why?

There's no reason to avoid using +=, it's a nice shorthand that helps code clarity.

1

u/mrbeehive Jun 05 '18

Learn Lua, it's fun.