Submitted via IRC for TheMightyBuzzard
The annual Stack Overflow developer surveys often include lots of bad news. "People still use PHP," for example, is a recurring and distressing theme. "Perl exists" is another.
But never before has the survey revealed something as devastatingly terrible as the 2017 survey. Using PHP and Perl are matters of taste. Extremely masochistic taste, certainly, but nobody is wrong for using those languages; it's just the programming equivalent of enjoying Adam Sandler movies. But the 2017 survey goes beyond taste; it goes into deep philosophical questions of right and wrong, and it turns out that being wrong pays more than being right.
Developers who use tabs to indent their code, developers who fight for truth and justice and all that is good in the world, those developers have a median salary of $43,750.
But developers who use spaces to indent their code, developers who side with evil and probably spend all day kicking kittens and punching puppies? Their median salary is $59,140.
Source: ArsTechnica
(Score: 2) by andersjm on Sunday June 18 2017, @12:10PM (7 children)
Spaces carry strictly more information. You can always convert a file with spaces to a file with tabs, but not the other way around.
Therefore, spaces are superior as a storage format.
If you want leading spaces to be narrower or wider than the original author intended, have your editor do it: Simply configure your editor to display leading spaces at half width or double width or whatever you like, and you can view someone else's code with whatever indentation you like.
(Score: 2) by The Mighty Buzzard on Sunday June 18 2017, @01:53PM (2 children)
You mean exactly like tabs were designed to do?
My rights don't end where your fear begins.
(Score: 2) by vux984 on Sunday June 18 2017, @04:33PM (1 child)
The big advantage of his solution is that the 'display' logic is then kept in the editor, where they belong.
(Score: 3, Insightful) by The Mighty Buzzard on Sunday June 18 2017, @06:06PM
As they are with tabs. Any editor worth calling one lets you set the display width of them.
My rights don't end where your fear begins.
(Score: 2) by Whoever on Sunday June 18 2017, @03:20PM (3 children)
That must be the most idiotic claim that I have heard in support of spaces. Of course you can convert tabs to spaces.
(Score: 2) by FatPhil on Monday June 19 2017, @05:44AM (2 children)
Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
(Score: 2) by Whoever on Monday June 19 2017, @06:13AM (1 child)
As long as the author followed the rule of tabs for indentation, spaces for alignment, then, no, you don't need to know the original author's tab width.
(Score: 2) by FatPhil on Monday June 19 2017, @06:41AM
--->--->get_fooey_with_some_bars(the_great_fooinator,
--->--->--->.....................bar_number_1,
--->--->--->.....................bar_number_2);
Because you'd want the extra '--->' tab for the single additional level of semantic nesting, but would want to align the arguments with '.' spaces. If you are saying that, then you're a brave man. As long as you use it everywhere consistently in your own code, and don't use it in anyone else's code, then I have no problem with that. It's internally logical, but it's vanishingly rare, which makes it practically useless. I wouldn't even know how to set my editor up to do that automatically for me.
Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves