It's not just age, plenty of people find 2 spaces hard to read. Thus the only logical choice for indentation is tabs. That way every reader can pick the size that is good for them.
We can continue using 2 spaces and configure editors to show those 2 spaces as your desired indentation. You can also use tabs for that, but it feels like that ship sailed over 30 years ago.
I don't, I think that line length limits are typically not a good idea and thus I don't like hard limiting them. Now obviously arbitrarily long lines are no good, I'm not advocating for people to write 300+ char lines. I'm just saying that sometimes there's good reasons to (slightly!) go over the "limit", for example shortening the variable name "users" to "usrs" to make a n+1 line fit into the n char limit would be a terrible idea. And also when this topic comes up then typically people implicitly think about the 80 char limit, which is just way too restrictive and has no reason to exist anymore, it's not 1980.
The limit on what constitutes a reasonable line length is a bit subjective but I'd say that well written code rarely goes above ~120 or so. Depends a bit on the language, some just have more boilerplate than others. But instead of making that a hard limit I'd warn above that number so actual people can decide if it makes sense there or if a rewrite is in order. Auto-formatting is great and all, but ultimately a human should have the last decision.
Though if you force me to pick a value, then it's 4 because that's the sanest choice for like 95-99.9% of all people.
JaumeGreen|2 years ago
I only can use it on personal projects, as most places I worked in use spaces.
vbezhenar|2 years ago
toastal|2 years ago
rkagerer|2 years ago
TheAceOfHearts|2 years ago
xmcqdpt2|2 years ago
jdrek1|2 years ago
The limit on what constitutes a reasonable line length is a bit subjective but I'd say that well written code rarely goes above ~120 or so. Depends a bit on the language, some just have more boilerplate than others. But instead of making that a hard limit I'd warn above that number so actual people can decide if it makes sense there or if a rewrite is in order. Auto-formatting is great and all, but ultimately a human should have the last decision.
Though if you force me to pick a value, then it's 4 because that's the sanest choice for like 95-99.9% of all people.