r/programming • • Nov 11 '22

NSA urges orgs to use memory-safe programming languages - C/C++ on the bench, as NSA puts its trust in Rust, C#, Go, Java, Ruby and Swift

https://www.theregister.com/2022/11/11/nsa_urges_orgs_to_use/
4.2k Upvotes

799 comments sorted by

View all comments

Show parent comments

4

u/TryingT0Wr1t3 Nov 11 '22

C# too, it's there if you really want or need

1

u/onequbit Nov 12 '22 edited Nov 12 '22

unsafe FTW!

Although to be fair, the point of the keyword is to let everyone know you are about to cross a line. Memory safety is as much about telegraphing the danger (because you think you know what you're doing) as it is avoiding it.

1

u/TryingT0Wr1t3 Nov 12 '22

Yeahp! Maybe application developers don't need it, but these are things that are useful to have when making libraries. Say, your library need to interact with other languages through some layer, some OS API, or something that this other thing is going to do the memory management.

1

u/onequbit Nov 12 '22

That's exactly what it is for, to allow C# to use external libraries, given there is inherently no safe way to do it. Still, maybe it's just me, but that keyword just begs to be abused.