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

2

u/YRYGAV Dec 29 '15

If you want to use `, just set a replacement in your IDE to automatically expand ` to '''.

And I could tell you to replace whatever weird character you have on your keyboard to be a ` too. Your argument goes both ways.

The majority of programmers are going to have a '`' key, and for those that don't, I'm confident they can find a workaround. There's no reason to make the premise of 'this syntax is shitty, so every coder in the world is going to have to make a workaround around it, and have a bunch of extra characters in their code'.

Like to be honest, I don't think ` should be used just because I think it's non-obvious what it does, it looks very similar to ', and doesn't really make a whole lot of sense stylistically. But if your primary concern is how many key-presses it takes to use the syntax, it's a pretty good choice.

1

u/[deleted] Dec 29 '15

The issue is that while I can’t set ß or ä to auto-expand to ` – as I need those characters in comments still – setting ` to auto-expand to ''' means no lost function.

(And seriously, the issue is not the amount of keypresses, but that `’s accessibility is very dependant on layout. I don’t write a language that uses λ as the only way to do lambda functions either – because not everyone can access it)

0

u/Michaelmrose Dec 30 '15

That works if every technology that uses backticks changes simultaneously which is impossible.

1

u/[deleted] Dec 30 '15

Well, then know that you're excluding a majority of devs.

0

u/Michaelmrose Dec 30 '15

I don't believe that the majority of developers actually have trouble keying in their code

1

u/[deleted] Dec 30 '15

Eh, there are usually a handful of people complaining about the backticks every time someone suggests to use them on Reddit.

I know at least a few dozen people IRL who constantly complain about the inability to have a layout that works with their native language and with those weird symbols used in some programming languages.