ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > Living Room

Developers who use spaces make more money than those who use tabs

<< < (5/7) > >>

Stephen66515:
You can't just assume somebodies indentation preferences...jeez.

f0dder:
I don't do much with Python.  However it does seem much more natural to type a block by hitting Enter, then Tab rather than holding down the shift key and hitting a curly brace.  At the end of the block you hit backspace to back off the indentation rather than again holding down the shift key and hitting another curly brace.  I didn't find it all that problematic when using an editor that knows Python.-MilesAhead (June 22, 2017, 09:18 AM)
--- End quote ---
I don't find adding braces is much bother, and it removes ambiguity - if a language uses indentation for semantic purposes, you run a higher risk of stupid bugs. Especially if you copy/paste snippets of code from the intarwebs, and who doesn't these days? :-)

You're either using a very, very narrow monitor (for professional development I've been on 120 columns with plenty of real estate for an IDE for 5+ years), or having crazy amounts of indents.
--- End quote ---
I guess you don't use end of line comments much.-MilesAhead (June 22, 2017, 09:18 AM)
--- End quote ---
Indeed, I don't.

I find that when I use proper variable and function names - which requires extracting well-defined, single-purpose functions - I don't need end-of-line quotes for anything. The code reads pretty naturally, and when I need comments, it's usually a larger block describing why somethign is done in a special way, performance considerations, external API/service quirks, whatever.

So use an editor that has a hard tab/spaces option.  I don't get the controversy.  But for people who may type in the < 30 wps range hitting shift brace combinations is distracting and causes a lot of lint since it is easy to get a bracket when you want a brace.  Also I notice many IDEs, at least in free tools, lack a reformatting indentation parser(such as Tidy.)  When I used Delphi 5 I found it liberating to just type in the code all messy and hit the function key for Delforex to indent and capitalize according to rules etc..  If everything lined up chances were good I did not have any typos.
-MilesAhead (June 22, 2017, 09:18 AM)
--- End quote ---
The controversy is a people thing, and it's already mentioned above. Tabs means flexibilty, spaces means people shoving their preferred indentation size down your throat.

mouser:
I find myself in general agreement with f0dder.


* I prefer tabs over spaces.
* If the codebase has already adopted spaces, consistency is more important so you have to use spaces.
* I feel like us tab folks have lost the battle.
* The idea of using pure indents instead of braces was a terrible decision by python designer.  Better would have been redundant use of brace and indent.

MilesAhead:
I don't do much with Python.  However it does seem much more natural to type a block by hitting Enter, then Tab rather than holding down the shift key and hitting a curly brace.  At the end of the block you hit backspace to back off the indentation rather than again holding down the shift key and hitting another curly brace.  I didn't find it all that problematic when using an editor that knows Python.-MilesAhead (June 22, 2017, 09:18 AM)
--- End quote ---
I don't find adding braces is much bother, and it removes ambiguity - if a language uses indentation for semantic purposes, you run a higher risk of stupid bugs.
-f0dder (June 22, 2017, 03:55 PM)
--- End quote ---
I tried Python back in the early 90s.  I had the same feeling about the idea of using indentation to denote blocks.  That's why I abandoned my investigation of the language.  Then in the 2000s I took another look at it.  It didn't seem so hairy when using the right tools.  It is not all that different and likely much less restrictive that using a SmallTalk sandbox.  I can remember not liking AutoIt also because it used that old function style with the commas instead of parens.  Now when I do AHK it's not such a big deal.  Although I use the newer style function syntax unless the old function makes something easier or provides more information.

I guess you don't use end of line comments much.
--- End quote ---

Indeed, I don't.

I find that when I use proper variable and function names - which requires extracting well-defined, single-purpose functions - I don't need end-of-line quotes for anything. The code reads pretty naturally, and when I need comments, it's usually a larger block describing why somethign is done in a special way, performance considerations, external API/service quirks, whatever.
--- End quote ---

As the man said, it's a personal preference.  I started off with hard tabs then 4 spaces to indent.  It depends on the programming language.  In AHK I like to use 2 spaces for indenting.  I don't see the advantage of a lot of empty space on the page.


So use an editor that has a hard tab/spaces option.  I don't get the controversy.  But for people who may type in the < 30 wps range hitting shift brace combinations is distracting and causes a lot of lint since it is easy to get a bracket when you want a brace.  Also I notice many IDEs, at least in free tools, lack a reformatting indentation parser(such as Tidy.)  When I used Delphi 5 I found it liberating to just type in the code all messy and hit the function key for Delforex to indent and capitalize according to rules etc..  If everything lined up chances were good I did not have any typos.

--- End quote ---

The controversy is a people thing, and it's already mentioned above. Tabs means flexibilty, spaces means people shoving their preferred indentation size down your throat.

--- End quote ---
The Python editors I've used automatically filter the input and detect the indentation levels, adjusting the number of spaces to what you are using.  Hardly a gagging operation to edit the source.



MilesAhead:
btw was it mentioned anywhere how much $/space they are paying?  I can crank up the autorepeat rate and hold down the space bar with the best of 'em!   :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version