News for hackers. Stuff that matters.
Re:State of Rust 0.11.0 by pjmlp on Wednesday July 16, 2014 @05:15AM (#8041205)
Funny to see stack allocation mentioned as C++ strong feature, when so many languages offer it.

Maybe this is a side effect of scripting languages and VM implementations going mainstream.

Re:State of Rust 0.11.0 by dbaupp on Wednesday July 16, 2014 @06:11AM (#8041343)
Please, be direct with your criticisms of me rather than just implying them.

What other commonly used languages offer pointerlessness to the same degree as C++? Rust, for sure. Not C as there are no generics, making allocations + void* and simplistic data structures like linked lists more common than necessary. Maybe D but AIUI there is some struct/class difference that forces GC allocation for classes. What else?

(Also, please read my original comment properly, I was not just talking about "stack allocation".)

Re:State of Rust 0.11.0 by pjmlp on Wednesday July 16, 2014 @07:14AM (#8041472)
I am just answering about placing data into the stack, and that is offered by all descendents of Algol/Pascal/CLU/Mesa/Modula/Ada/... family of languages.

You can place data in the stack in all of them.

Quite a few of them allow for generics, starting with CLU.

Ada also offers RAII, although a bit more verbose than C++ way of doing it.

All of them allow reference arguments, hence no need for pointers for output parameters.

Re:State of Rust 0.11.0 by dbaupp on Wednesday July 16, 2014 @09:10AM (#8041802)
RAII is totally irrelevant to this discussion, and I clearly said I was not just talking about placing data on the stack.

> All of them allow reference arguments, hence no need for pointers for output parameters.

I wasn't very clear, the use of a C-style pointer is irrelevant: if it is being used as a reference (i.e. not owning, no need for clean-up/deallocation), then it counts as a reference. I was using the Rust terminology where 'pointer' mostly refers to 'smart pointer'.