News for hackers. Stuff that matters.
Re:GitHub Super Linter: one linter to rule them all by philwelch on Thursday June 18, 2020 @02:08PM (#23565838)
The 88 character limit is just a best effort thing anyway. I find the double-quote coercion more disruptive.
Re:GitHub Super Linter: one linter to rule them all by wenc on Thursday June 18, 2020 @02:23PM (#23566010)
I started programming in the 80s, so I'm used to double-quoting anyway.

Apostrophes occur so often in English that it makes it easier to type strings like "I'm a dog". With single quoting you have to go 'I\'m a dog'.

If I hit double quotes in a string, I just triple-quote.

"""He said "hah" sarcastically""".

I know Guido (van Rossum) prefers single quotes -- I'm not sure why exactly -- so it's become a default Python style. I tried to adopting it but always ended up reverting to double quotes.

Re:GitHub Super Linter: one linter to rule them all by _bohm on Thursday June 18, 2020 @04:21PM (#23567539)
I use single quotes simply because I'm lazy and tapping the quote key with my pinky is marginally easier than shift-quote :p
Re:GitHub Super Linter: one linter to rule them all by a1369209993 on Thursday June 18, 2020 @05:10PM (#23568079)
> I'm not sure why exactly

Might be ease of typing? Eg: `foo = 'bar'` doesn't require any shift chords, whereas `foo = "bar"` requires two. Though then I'd expect similar preference for kebab-case in identifies, for similar reason.

Re:GitHub Super Linter: one linter to rule them all by wenc on Thursday June 18, 2020 @08:18PM (#23569647)
Yes, that must be right, although to me the trade-off is escaped strings which lack good aesthetics.

'The class of \'72 didn\'t think much of Sam\'s speech'

vs

"The class of '72 didn't think much of Sam's speech"

To me, the shift chord is an almost negligible price to pay for more aesthetically pleasing strings, especially since on a QWERTY keyboard, the shift key is literally right next to the ' key. For emacs users who are used to complex key chords, it's even more negligible.

I do use single quotes for strings frequently in interpolated f-strings though:

f"The date is {result['year']}"

Re:GitHub Super Linter: one linter to rule them all by chrismorgan on Friday June 19, 2020 @04:29AM (#23572350)
Unless I mean straight quotes, I type curly quotes as a matter of course. Love my Compose key. :)
Re:GitHub Super Linter: one linter to rule them all by minimaxir on Thursday June 18, 2020 @03:49PM (#23567097)
That, I've gotten surprisingly used to. (atleast Black is smart about using single-quotes instead if you use double-quotes in a string)
Re:GitHub Super Linter: one linter to rule them all by mintplant on Thursday June 18, 2020 @03:48PM (#23567082)
I maintain Lavender as a Black alternative with single-quote support.

https://github.com/spinda/lavender

Re:GitHub Super Linter: one linter to rule them all by leadingthenet on Thursday June 18, 2020 @04:59PM (#23567960)
But the double quotes are exactly what I like about Black haha.