Agreed about the bad hanging indent, but I like two shift-widths for continuations of block headers (function definitions, loops, if statements) so that it doesn't visually flow into my function definition. Python e.g.: def fn( a, b, ): do(a) other(b)
-
-
-
I handle this like: def fn( a, b, ): do(a) other(b)
- Još 2 druga odgovora
Novi razgovor -
-
-
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
-
-
I wouldn't describe it as illegible but I fully back the sane approach.
-
Most of it is that there are hundreds of those in a file and it's skipping from far-right back to home and losing your place. It gets bad when there are a significant number of them.
Kraj razgovora
Novi razgovor -
-
-
rubocop to enforce it? :)
-
@bbatsov I still have that PR out don't I? - Još 6 drugih odgovora
Novi razgovor -
-
-
I'm indifferent

-
(admittedly I tend to just copy the style of the repo, so
)
Kraj razgovora
Novi razgovor -
-
-
Even more so when you have multiple function calls with different lengths one after the other and everything is at a different level of indentation. Infuriating!
-
One case can be confusing, multiple in a file can be annoying, but across a massive project it becomes absolutely impossible to read at a glance. Java and a lot of editors around it are notorious for enforcing that for some reason.
Kraj razgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.