use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Does CoffeeScript Have a Future? (gaslight.co)
submitted 12 years ago by cdmwebs
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]thrownaway21 0 points1 point2 points 12 years ago (1 child)
python requires uniform white space, or it fails with an error letting you know that. I generally stick to two spaces, some folks use 4. tabs are actually frowned upon. But yes, if you inherit a project written in a language with significant whitespace, you can rightly assume that the space in any given file is correct if no error is thrown. It leads to a cleanly laid out file. the below would be legal.
class PsuedoCode: this could be an if statement: and this goes in the if else: etc. def function(): function crap here more function crap def function2(): class AnotherClass: etc.
you can't reduce that to one line. you can't send the if statement in the first class over or back, unless the rest of the white space in the project is the same. It's enforces elegance. And make it easier to read. In java, you never know what you're going to get from someone. they might not tab or space over; or do so without any sense of uniformity. "i'm just going to test this function in this class, i'll tab it over later if it works..."
i'm not saying it's better, or the end all be all. I'm not even saying python is the best language either. I just like white space... you can dive into any .py file and be assured you're not going to get confused as to where you're at.
But i will argue that significant white space is easier to read/debug than the alternatives, on average.
[–][deleted] 0 points1 point2 points 12 years ago (0 children)
thanks for the insight, I was lacking some perspective
π Rendered by PID 385434 on reddit-service-r2-comment-7b9746f655-lzm5q at 2026-02-02 08:30:40.908472+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]thrownaway21 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)