r/Clojure • • Jan 19 '14

Clojure, the bad first impressions

http://kodare.net/blog/clojure-bad-first-impressions/
70 Upvotes

81 comments sorted by

View all comments

2

u/OmniJinx Jan 19 '14

On the next-to-last point about the commented out code, I agree that it should have been deleted rather than commented out. However, a quick git blame gives you the commit, so it's not without explanation.

https://github.com/clojure/clojure/commit/679c79508713acddca1e18d1e28dafae885e5096

7

u/Anderkent Jan 19 '14

Uh 'Get rid of X' is not an explanation for why X is commented out. I can see you got rid of X.

5

u/xenomachina Jan 20 '14

I find it somewhat ironic that you suggest using git blame to find the explanations for commented out code. Commented out code tends to be a sign of someone who doesn't really trust their version control system. In general, code should be deleted, not commented out. If someone needs it back they can get it from an older version of the code.

3

u/burkadurka Jan 20 '14

This is true, unless (not sure if this is case here) you want the commented code around as documentation for the surrounding code. For an imaginary example

// FIXME: this is a hack around issue #352 until someone figures out why the commented out portion segfaults
//missiles.launch();
gun.shoot(target=missile_launch_button);

5

u/xenomachina Jan 20 '14

Right, though in that case you're effectively talking about code that's part of a comment (ie: acting as documentation), not commented out (ie: merely disabled) code.

1

u/kankyo Jan 20 '14

There are other use cases for commented out code too, like some code that makes debugging easier. This is not the case here though...