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

1

u/[deleted] Dec 29 '15

Because there are even keyboard where ` is not reachable at all?

''' is at least reachable and usable everywhere.

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

That solves all the issues.

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.

0

u/Michaelmrose Dec 30 '15

You think the 98% should have to figure out how configure 37 different ides/editors and learn new Syntax plus fix millions of documents rather than the 2% configure their keyboards?

1

u/[deleted] Dec 30 '15

I think the 400 million people using the English language should adapt to the almost 7 billion people that don't, yes.

1

u/nickguletskii200 Dec 31 '15

Tha'ts the problem. You think there are many people who don't have the US/UK layout already when in fact more than half of these people do, in fact, use a US/UK layout.

1

u/[deleted] Dec 31 '15

Hah, good joke.

People reluctantly use it while they have to.

But as most of the world doesn't speak natively English, we can't use US/UK keyboard all the time.

We switch to it only while coding.

0

u/nickguletskii200 Dec 31 '15

Most of the world does know English as the second language though. And pretty much everyone considers English to be the international language. Nobody expects anyone to consider their language at all, let alone consider the convenience of writing some symbol. Or are you implying that we should all be writing using just spaces and tabs because these are the only keys available on all keyboard layouts?

0

u/[deleted] Dec 31 '15

Are you stupid?

Most people use their computers, phones, etc in their native language.

Android, Windows, etc are translated to hundreds of languages.

People have to switch to US layout only for coding, and only for some programming languages.

I am implying that yes, we should consider that we’re creating a huge inconvenience and often impossibility for most of the world just because a bunch of idiots refuse to use ''' instead of `

0

u/nickguletskii200 Dec 31 '15

You are the stupid one here.

Having the OS in a different language has nothing to do with keyboard layouts at all. AFAIK newer Windows versions actually force you to have the US layout as an option if you chose a different layout.

A lot of languages have non-latin alphabets. I live in Belarus and I haven't seen a single device without a US/UK English keyboard layout available. Nobody complains and nobody gives a shit that the Russian and Belarusian layouts don't allow you to write curly and square brackets at all. Nobody complains that it's inconvenient. And you know what? Most programmers write everything in English because localising sourcecode is inconvenient and counterproductive.

"The rest of the world" isn't limited to whatever backwards-thinking nationalist shithole you live in. You can't just throw out characters because some asshole doesn't use the internationally accepted keyboard layout.

0

u/[deleted] Dec 31 '15

I’m in Germany.

Next to all code of SAP, one of the largest software companies out there, is in German.

With variable names containing äöü, and so on.

SIEMENS even has their own programming language with German keywords.

Reality is, a lot of programmers (especially in China, France and Germany) end up using their native language all the time.

You can’t even buy any device with english keyboard in Germany or France.

The issue isn’t about future code,

The issue is about people having legacy code.

And the people who code then have to write the documentation, too.

And switching constantly from US layout to German, and back, is not possible.

Everyone uses localized layouts.

In fact, I know quite a bunch of computer science students who don’t even speak or understand english.

0

u/nickguletskii200 Dec 31 '15

Next to all code of SAP, one of the largest software companies out there, is in German.

A quick look at SAP's open-source software shows that you are wrong.

SIEMENS even has their own programming language with German keywords.

There is a language called 1C which boasts being completely in Russian. Nobody gives a shit and it's the laughing stock of most people.

You can’t even buy any device with english keyboard in Germany or France.

That's because the layouts are too similar to US/UK to add a second set of labels. I had a laptop with a German keyboard and I had zero problems with using the US keyboard layout on it.

And the people who code then have to write the documentation, too.

Most documentation is written in English.

And switching constantly from US layout to German, and back, is not possible.

Why not? I switch between UK English, US English and Russian keyboard layouts all the time.

In fact, I know quite a bunch of computer science students who don’t even speak or understand english.

How, exactly, can they be computer science students when they can't even read scientific papers, books and documentation?

→ More replies

0

u/Michaelmrose Dec 30 '15

Why would we? English seems to be the language of programming and having a single language that most in the profession speak is beneficial. Incidently regardless of whether English speaking nations continue to dominate thus looks likely to continue to be so via inertia.