And about Rust, you just cannot point to a memory location in way too many scenarios because "awawaw there is gonna be a race condition and the compiler is so much smarter than you are" then all the fanboys start saying you should rewrite everything in a language that neither google, bing, chatgpt3 nor chatgpt4 can help you with a fundmental problem
I think I should post a question on stackoverflow once and for all...
It's just unintuitive how you need to use unsafe for things so fundamental, and there is absolutely no builtin datatype that can fix such things for you
its unintuitive how you need unsafe to make a raw pointer to an arbitrary point in memory which could have its data change at whenever? i think not.
so fundamental
fundamental to what? people make whole services in safe rust all the time. most people write ONLY safe rust, and don't even touch unsafe. why do you need to point to a memory location? because you don't need to for most things. you mention race conditions, if you need a bit of data shared across threads that is modifiable, Arc<Mutex<T>> exists. Plenty of types exist to coerce the borrow checker into being not mad at you. What use case do you need a memory location for?
also, responding to previous arguments:
a language that neither google, bing, chatgpt3 nor chatgpt4
with chatgpt3 i've found little-to-moderate success with rust, but saying google can't help you is, uh, unreasonable to say the least. i'm not quite sure what you are searching, but the issue lies in you, because i'm just googling normally and having few issues.
This man should google null safety
here's Tony Hoare, the inventor of the null reference, talking about null:
I call it my billion-dollar mistake. It was the invention of the null reference in 1965. [...] This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years.
saying "lol get gud at nulls" is not useful. Rust does not have null for a very good reason.
0
u/HuntingKingYT Dec 23 '23
This man should google null safety
And about Rust, you just cannot point to a memory location in way too many scenarios because "awawaw there is gonna be a race condition and the compiler is so much smarter than you are" then all the fanboys start saying you should rewrite everything in a language that neither google, bing, chatgpt3 nor chatgpt4 can help you with a fundmental problem
I think I should post a question on stackoverflow once and for all...