>>221
neither is the case. "automatic tail call optimization" is basically impossible, so you just be explicit about it with the 'recur' form and Clojure uses constant stack space.
http://clojure.org/special_forms#recur
Since Clojure uses the Java calling conventions, it cannot, and does not, make the same tail call optimization guarantees. Instead, it provides the recur special operator, which does constant-space recursive looping by rebinding and jumping to the nearest enclosing loop or function frame. While not as general as tail-call-optimization, it allows most of the same elegant constructs, and offers the advantage of checking that calls to recur can only happen in a tail position.
In practice it makes almost no difference because you tend not to write non-lazy (manually) recursive functions.
>>222
If C is bothering you, you're solving the wrong problem with it. And the problems that C isn't good at solving are generally better solved by things higher level than C++. The advantages that C++ has over C only seem impressive if those are the only two languages you've used. C++ is still woefully inadequate at abstraction, and the price it pays for the meager capabilities it does have are glacial compile times and ridiculous complexity. I'm not just overusing the word "ridiculous." C++'s complexity deserves ridicule.
Everything high performance is going "data-oriented" these days anyway, where as much as possible is done on the stack and lots of attention is being paid to how blocks of memory fit into cache and complex object models are being thrown out the window.
The desire for optimization and abstraction at the same time is essentially stupid. Optimization
means specified and inflexible. Abstraction
means preventing implementation details from affecting your design.
It's like, if I'm gonna have desert, I'm gonna eat a bunch of fucking ice cream. I'm not going to have have sweetened tofu. It's like you look at C and it's tofu, right? And you're like, "no, this isn't sweet enough!" The solution is to go to a different fucking restaurant.