"Oh God, Who Wrote This?", "You Did", "Wait? I wrote This?"

Started by
12 comments, last by wodinoneeye 10 years, 1 month ago

Way too many parenthesis to keep track of what's inside what (and some are entirely unnecessary).

Parenthesis are never unnecessary as long as they increase clarity, in my opinion.

True. Especially with math, sometimes it's better to be explicit even when order of operations already does what you want. But I was mostly talking about this, which really doesn't have any redeeming quality:

getTimeDiff( (eventLog.size()-totalMatches))

Advertisement

And then there was LISP (well, Scheme, but anyway...):


(define (factorial n) (let recurse ((n n) (acc 1)) (if (zero? n) acc (recurse (sub1 n) (* n acc)))))

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

And then there was LISP (well, Scheme, but anyway...):


(define (factorial n) (let recurse ((n n) (acc 1)) (if (zero? n) acc (recurse (sub1 n) (* n acc)))))

every time i see lisp:

20120914120348!Exploding-head.gif

Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.

And then there was LISP (well, Scheme, but anyway...):


(define (factorial n) (let recurse ((n n) (acc 1)) (if (zero? n) acc (recurse (sub1 n) (* n acc)))))

Of course then Lisp was a contemporary of Fortran when teh programmers were just happy NOT to have to program in machine code any more....

I believe also that the indent also had been invented by then (as in - its always possible to make code look crappy(er) by running it all together into a contiguous block)

--------------------------------------------[size="1"]Ratings are Opinion, not Fact

This topic is closed to new replies.

Advertisement