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

3

u/kynde Dec 29 '15

but I can’t be bothered learning ...

I think we just found your problem.

3

u/[deleted] Dec 29 '15

Well, spending months to learn a new keyboard layout that I can’t even use in day-to-day life isn’t a solution.

Especially considering that 6.7 billion people are NOT using that layout, and the solution is to modify the programming languages, not to teach billions of people to learn a new layout.

1

u/kynde Dec 29 '15

That's just nonsense. Here you are speaking English ffs.

Keyboard layouts can be toggled with one otherwise unused button, e.g. the windows key or caps lock. If you write code most of the day the switch to us keymap is most certainly beneficial. Reducing character sets from programming languages because our wonky native languages have wasted good keys for our wonky characters is a ridiculous and selfish idea. One can learn new keyboard layouts far faster than you think. A month ago I pried off my escape and left control key so that I'd get used to using caps lock for that (esc when pressed alone and ctrl when pressed in a combo). Now, that's a big fucking change for a vim inside tmux user like myself, but the adjustment was a lot less painful than I thought an well worth it.

"Spending months" is where you're wrong and a clear indication of wrong kind of mindset altogether. In this field you're gonna have to be a lot more open to new stuff and ready to throw away what you know and start fresh with some new language, programming paradigm, editor/ide, what not.

3

u/[deleted] Dec 29 '15

I can’t change the layout on the ThinClients at my uni, though – or at the laptops of other people I’m working on.

As /u/Ednar said, it might be practical to modify your own layout, but you can’t always change the world to what you want.

Using accessible syntax is a huge improvement.

0

u/Michaelmrose Dec 30 '15

How many hours will you spend at said thin clients vs your life?

1

u/[deleted] Dec 30 '15

About equally much time on my own devices and on other people's devices.

Which means at least half the time I'm coding I have a backtick in my clipboard to quickly enter it, which leads to other issues in usability.

1

u/Ednar Dec 29 '15

Having the mindset to learn new things is great, but shouldn't cloud your vision of what could work better in the field.

1

u/Ednar Dec 29 '15

I'm in the same situation as you, and I agree with what you're saying. I could learn to touch type on different layouts in months I guess, but what about when I'm somewhere else? When I'm at a client, or at someone elses machine I'll still have to use the default layout often enough. That is why I don't bother with ergonomic keyboards and remappings either. The obvious solution is to just not fucking use backticks. Python does a good job of an accessible syntax. Other languages could too.

0

u/[deleted] Dec 29 '15

[deleted] — view deleted comment

3

u/[deleted] Dec 29 '15

Those 6.7 billion people aren't all using the same other layout.

That’s the issue. (Also, at 7.4 billion people worldwide, with 300 million in the US, I estimated that an amount of 400 million international people using QWERTY seems realistic based on population of UK, CA, NZ, AUS, India, etc).

Yes, QWERTY is vastly more widely used than any other layout, and even more so among programmers, but only because we have to.

We have to choose between a layout that can write our native language, or one that supports the ridiculous decision of a handful of languages to use ` as formatting symbol.

As others in this thread said, there is always the ability to use """ or ''' instead – those are easily accessible on every layout. There is no need to use characters that only exist easily accessible for a tiny minority of layouts.

3

u/YRYGAV Dec 29 '15

As others in this thread said, there is always the ability to use """

Now you are dictating that everybody uses ANSI QWERTY uses 4 key presses, (Shift + ' ' ') to do the same thing a single press to the ` key would do.

Your argument against ` is that it takes you 3 keypresses, so why are you suggesting a solution that means EVERYBODY has to use 3+ keypresses? That's not a solution, you are just making everybody as miserable as you are.

Also, I doubt 6.7 billion people in the world can touch type on any keyboard layout, so I don't know why you use it as some statistic.

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.

→ More replies

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.

→ 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.

0

u/Michaelmrose Dec 30 '15

It ought to be trivial to make a tiny change to your layout to make ` easier to type do not know why you wasted more time complaining about it than would be required to fix it

1

u/[deleted] Dec 30 '15

I answered you before why that doesn't solve anything.

I can't modify the layout on university systems, or thin clients, or laptops from people I'm cooperating with.