3 ms·
Yeah, there is nothing complicated about returning a static array in C. C is a much simpler language than many people assume -- of course, it can get really ha
by merlincorey 4y ago
Yeah, there is nothing complicated about returning a static array in C.
C is a much simpler language than many people assume -- of course, it can get really hairy and complicated especially when you need to do dynamic memory management, but that's not what the GP was asking for in this case.
- chronial 4y ago> that's not what the GP was asking for in this case. You really think that when they mentioned the dynamically allocated `Vec` in Rust (which has fixed-sized arrays) and "manual memory management" in C, what they were actually talking about was a static array?
- jnxx 4y agoBut you need dynamic memory management for side-effect-free functional programming.