News for hackers. Stuff that matters.
Re:Raw String Literals Removed From Java 12 as Feature Set F... by ccleve on Saturday December 22, 2018 @11:52AM (#18741299)
I'm glad they're going to try to get multi-line strings right, but seriously, I (and many other people) have wanted this feature for 19 years.

This is not an exaggeration. I was writing code in Java to access SQL databases in 1999 and needed it to express long SQL strings.

One would think they could move a little faster.

Re:Raw String Literals Removed From Java 12 as Feature Set F... by emidln on Saturday December 22, 2018 @12:03PM (#18741359)
I don't think I've ever wanted SQL embedded in my Java source over loading it as a resource. Loading it as a resource allows me to edit the SQL in a sql-aware text editor.
Re:Raw String Literals Removed From Java 12 as Feature Set F... by stickfigure on Saturday December 22, 2018 @12:15PM (#18741427)
IntelliJ is aware of SQL in text strings, and even validates it against the database schema.

I like my SQL right next to the code that sets parameters, processes results, etc - mismatches are apparent (and also validated by IntelliJ).

Re:Raw String Literals Removed From Java 12 as Feature Set F... by orf on Saturday December 22, 2018 @12:56PM (#18741639)
Not just SQL, but any language. It's one of my favourite (and IMO very under-appreciated) features of the Jetbrains editors.
Re:Raw String Literals Removed From Java 12 as Feature Set F... by halfastack on Saturday December 22, 2018 @01:44PM (#18741866)
Intellij also automatically escapes your string and inputs newlines wherever necessary, so if you copy a long string, it's generally done for you (I've copied pieces of XML and it generally worked totally fine).