r/rust • rust • Dec 26 '17

Outperforming Rust with Functional Programming

http://blog.vmchale.com/article/fast-functional
106 Upvotes

90 comments sorted by

View all comments

Show parent comments

-2

u/[deleted] Dec 27 '17 edited Dec 27 '17

Because it isn't possible to do in C. ATS has better safety guarantees.

11

u/viraptor Dec 27 '17

Everything in that C function happens on the stack / in registers. There's no heap involved. I really don't understand what you mean by saying C can't do stack-allocated arguments in this case.

0

u/bobogei81123 Dec 29 '17

I'm curious what "we do something that is not possible to do in C - we safely stack-allocate a function argument."

Honestly, I can't think of a case that violates memory safety in C if no pointers/arrays are used.