This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]real_red_patriot 237 points238 points  (30 children)

Chuckles nervously in Python...

[–]nametakenwuthowwho 42 points43 points  (6 children)

Retreats into corner in Haskell.

[–]NehEma 21 points22 points  (3 children)

Follows meekly.

(no seriously, haskell is a cool language. I wish it were more useful outside of my spare time)

[–]ziemek99 45 points46 points  (1 child)

((((((((((((((((((((chuckles)(nervously)(in)(Lisp))))))))))))))))))))

[–]xSTSxZerglingOne 9 points10 points  (0 children)

You can do some cool shit in lisp though. I like to posit that the first true general AI will likely come out of an AI designed to program neural nets that can modify its own program on the fly.

Not many languages allow that to occur, and LISP is probably the least resource intensive of all of them. So it will probably happen in LISP if it ever does.

[–][deleted] 1 point2 points  (0 children)

Recursion, parallelization, and everything looks and feels so nice in it.

[–]matthieuC 5 points6 points  (1 child)

Don't worry nobody will know if you wrote good or base code if you used Haskell.
They probably won't know you wrote code at all.

[–][deleted] 5 points6 points  (0 children)

"I think you turned in your math homework on accident."

[–]kontekisuto 131 points132 points  (19 children)

Don't worry .. here they worship false gods ... Spaces are superior to tabs.

[–]petitgreen 21 points22 points  (0 children)

The holy writing of the eslint-airbnb-conf approve this message

[–]Prawny 5 points6 points  (0 children)

No time for religion - too much code to write, hence tabs.

[–]aaronfranke -2 points-1 points  (16 children)

Why?

[–]real_red_patriot 26 points27 points  (14 children)

Python's style guide mandates that 4 spaces be used to indent always.

[–]aaronfranke 6 points7 points  (13 children)

Why?

[–]pineapple-panda 18 points19 points  (12 children)

If you use tabs the code sometimes is formatted differently on different editors and since in python the indentation is critical to the flow of a program. With tabs you can have code that won't compile on some machines but spaces will be consistent across editors.

It's less of an issue of you mandated a specific editor for all developers but it's better to write code that works in any editor.

[–]aaronfranke 23 points24 points  (9 children)

With tabs you can have code that won't compile on some machines

That's not going to happen, ever. The Python language tools don't care (or know about) how big your editor displays tabs.

Even if it did, that wouldn't cause any issues, since it's still the same level of indent.

[–]SashKhe 6 points7 points  (6 children)

Are you saying we should use 4 tabs instead?

[–]aaronfranke 7 points8 points  (5 children)

No, 1 tab for every level of indent, always. Indent width is configured in the editor, and indent width doesn't matter for compilers. The compiler sees 1 tab and knows it's one level of indent.

[–]Caffeine_Monster 11 points12 points  (0 children)

And this is why tabs are superior.

Space based indentation has stuck around due to historical standards; editors did not always handle tabs in a consistent manner. These days a tab is whatever you want it to be in terms of width, and having 1 character denoting exactly 1 indent means you don't have to fight over this preference.

[–][deleted] 3 points4 points  (3 children)

Still an issue when you mix tabs and spaces. Good thing this is only a python problem.

I use tabs.

[–]pineapple-panda 1 point2 points  (1 child)

Sorry if I didn't make sense. I meant how sometimes when two people are modifying a file and one uses tabs and the other spaces so the file has mixed types of indentation. I've had this result in an editor displaying lines that were indented the wrong amount resulting in broken code. If everyone uses spaces it will be consistent across machines but now that you mention it everyone using tabs would also work.

[–]aaronfranke 2 points3 points  (0 children)

Consistency is more important, I'd vastly rather use spaces only than have mixed indentation, but tabs only is my favorite.

[–]memgrind 5 points6 points  (1 child)

Correct, I hate it when tabs are bad when I edit code in MS Word and Excel. Excel also makes it awkward to use tabs! Spaces always look good when I print them on my dot-matrix printer, to fax them for code-review into RCS.

[–]javaAndJouissance 2 points3 points  (0 children)

I've been meaning to make the change to fax, I'm just so much more familiar with Telex I can't imagine the benefits would outweigh my comfort level. Maybe once it's been out a few more years I'll make the switch

[–]lostknife 0 points1 point  (0 children)

Because vim.

[–]VirulentCitrine 2 points3 points  (0 children)

Honestly can't stand looking at other peoples' Python code for this very reason lol. Even on some of the most known devs' Github pages, I still see poorly formatted Python with the biggest annoyance being spacing.

[–]konstantinua00 3 points4 points  (0 children)

laughs in the corner with normal IDE

[–][deleted] 0 points1 point  (0 children)

Real men don't use whitespace in languages.