Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Why is C++...

Name: Anonymous 2011-12-07 12:06

...so bad? Why does it have such a bad reputation?

I'm an experienced C++ programmer and, while the language has warts, I can't understand the reason for the enormous amount of criticism against the language.

I'd like to hear the honest opinions of /prog/rammers in this regard.

Name: Anonymous 2011-12-17 14:16

>>235
much more often than not CPS can't benefit from tail calls...

at any rate, it's all silly because with lazy sequences, you so rarely write recursive functions. that's what I keep saying.

It's way more idiomatic Clojure to write


(def factorial #(reduce * (range 1 (inc %))))


than it is to write

[code]
(defn factorial [n]
    (loop [cnt n acc 1]
       (if (zero? cnt)
            acc
          (recur (dec cnt) (* acc cnt)))))
[code]

Seriously, the lack of laziness in a lisp is a bigger deal breaker form e than the lack of automatic tail call elimination. Not to mention immutable sets/vectors/associative arrays.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List