Re:Black – Uncompromising Python code formatter
by adossi on Friday May 17, 2019 @12:40PM
(#19941225)
You could say that about anything, though. Why use punctuation and capitalization when typing forum comments? Its just syntax after all.
[ Parent
| on HN ]
Re:Black – Uncompromising Python code formatter
by awinder on Friday May 17, 2019 @12:48PM
(#19941320)
Why use many word when few word do trick
Re:Black – Uncompromising Python code formatter
by ben509 on Friday May 17, 2019 @01:34PM
(#19941759)
Because you don't know if they've done the trick. That's why natural language is padded with extra words to add context and help rule out misunderstandings. The grammatical rules of agreement are one mechanism to do this.
And you can see the phenomenon of over-abbreviation by reading a few debates on twitter and repeatedly seeing, "how can you not understand what I tweeted?!"
Re:Black – Uncompromising Python code formatter
by gooseserbus on Friday May 17, 2019 @01:57PM
(#19941976)
FYI you're replying to a joke from The Office (US)
https://www.youtube.com/watch?v=_K-L9uhsBLM
Re:Black – Uncompromising Python code formatter
by TeMPOraL on Friday May 17, 2019 @12:59PM
(#19941422)
No, that's a completely invalid objection. Punctuation in natural languages isn't just aesthetic, it changes meaning.
Re:Black – Uncompromising Python code formatter
by rcfox on Friday May 17, 2019 @03:53PM
(#19942965)
Punctuation, or lack of it, can change the meaning in programming languages too.
https://medium.freecodecamp.org/codebyte-why-are-explicit-se...
Re:Black – Uncompromising Python code formatter
by anoncake on Friday May 17, 2019 @04:12PM
(#19943117)
Yeah, but no one would remove punctuation from a program because they think it looks nicer.
> Javascript developers
Oh, of course.
Re:Black – Uncompromising Python code formatter
by JoBrad on Friday May 17, 2019 @06:59PM
(#19944406)
I remove semicolons from JS b/c I feel like they are a bit of a hack. Except where it's required by the language (for loops, which are becoming less used quite rapidly), your code generally shouldn't be so complex as to require semicolons for readability.
Having said that, I've been introducing a lot more colons, since I use TypeScript.
Re:Black – Uncompromising Python code formatter
by anoncake on Saturday May 18, 2019 @10:12AM
(#19947456)
I was referring to punctuation that is, in some way, actually necessary. No one ends their lines with semicolons in python although it's valid. The rules when the interpreter will "insert" them are obvious. Not so in Javascript.
Re:Black – Uncompromising Python code formatter
by andrewprock on Friday May 17, 2019 @05:03PM
(#19943545)
Don't forget gofmt.