Could someone also ELI5:
1) Most of the languages listed by the NSA are built on top of C and/or C++, and neither has GC. Being that they are the high level languages built on top of the low level C/C++, how then are those languages ultimately "memory safe"?
2) What then does that mean for languages implemented in C/C++, even if not directly built on or related to them? Doesn't that ultimately influence memory allocation anyway?
Both my braincells thank you for any adviceπππΌ
1) I'm not exactly sure what you mean by "built on top of C/C++", at least for Rust. Perhaps the compliers are written in C/C++ (which isn't true of Rust at least, but perhaps others). Regardless, see the second answer:
2) If they are built on top of C/C++, then so long as the compiler only can possibly generate memory safe code, the other language is also memory safe. I think another commenter's "stencil" example is apt here - the compiler for the language has a bunch of stencils it can use from your code to generate the lower level code. So long at the stencils themselves are utilizing memory safe code, the higher level language is memory safe, because it will never generate something that is not memory safe.
1) I'm not exactly sure what I mean either π€·ββοΈ, it's just the way I've interpreted low to high level language development, as in they are built on the foundations made by low level languages so that now the thousands of files of boilerplate-esque code lying underneath HLLs allow them to be typed in a much simpler and human friendly way. Both a "stand on the shoulders of giants" way and extra filter to help translate between human letters and binary electrical signals.
2) Ahh I see, that then paints the picture for me the other way around: high level initiates the action, to be filtered down into lower level and ultimately machine assembly then binary. That makes sense. I don't understand enough at these levels of what is going on specifically, what specific processes executed by what specific code, to make sense of it beyond that though.
Thanks for the advice, it helps clear some things up
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Could someone also ELI5:
1) Most of the languages listed by the NSA are built on top of C and/or C++, and neither has GC. Being that they are the high level languages built on top of the low level C/C++, how then are those languages ultimately "memory safe"?
2) What then does that mean for languages implemented in C/C++, even if not directly built on or related to them? Doesn't that ultimately influence memory allocation anyway?
Both my braincells thank you for any adviceπππΌ
1) I'm not exactly sure what you mean by "built on top of C/C++", at least for Rust. Perhaps the compliers are written in C/C++ (which isn't true of Rust at least, but perhaps others). Regardless, see the second answer:
2) If they are built on top of C/C++, then so long as the compiler only can possibly generate memory safe code, the other language is also memory safe. I think another commenter's "stencil" example is apt here - the compiler for the language has a bunch of stencils it can use from your code to generate the lower level code. So long at the stencils themselves are utilizing memory safe code, the higher level language is memory safe, because it will never generate something that is not memory safe.
1) I'm not exactly sure what I mean either π€·ββοΈ, it's just the way I've interpreted low to high level language development, as in they are built on the foundations made by low level languages so that now the thousands of files of boilerplate-esque code lying underneath HLLs allow them to be typed in a much simpler and human friendly way. Both a "stand on the shoulders of giants" way and extra filter to help translate between human letters and binary electrical signals.
2) Ahh I see, that then paints the picture for me the other way around: high level initiates the action, to be filtered down into lower level and ultimately machine assembly then binary. That makes sense. I don't understand enough at these levels of what is going on specifically, what specific processes executed by what specific code, to make sense of it beyond that though.
Thanks for the advice, it helps clear some things up