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 9:23

>>232
In practice it makes almost no difference because you tend not to write non-lazy (manually) recursive functions.
But that's wrong, not all tail-recursion is tail-recursive:
(define (remove-duplicates xs) ; removes the consecutive duplicates in a list
  (cond ((or (null? xs) (null? (cdr xs))) xs)
        ((equal? (car xs) (cadr xs))
         (remove-duplicates (cdr xs))) ; tail recursion
        (else (cons (car xs) (remove-duplicates (cdr xs)))))) ; no tail recursion

And there are more reasons why loop/recur are just an ugly workaround for proper tail calls.

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