News for hackers. Stuff that matters.
Re:Two Years with Rust by pjmlp on Monday March 23, 2020 @05:21PM (#22668898)
That is a common misconception.

It only applies to threaded code, as soon as IPC, or other kind of external resources enter into the picture there is very little that Rust's type system can do to help with.

Re:Two Years with Rust by burntsushi on Monday March 23, 2020 @06:47PM (#22669612)
There is zero misconception in the GP. Catching data races in threaded code is extremely valuable, regardless of whether it applies to IPC or not. Why? Because non-IPC multithreaded code is a thing. Libraries like rayon even make this sort of parallelism quite easy. With the help of the Rust compiler, it's all safe too.

Just because this doesn't extend to IPC (of course not) doesn't mean there is some kind of misconception here.

Re:Two Years with Rust by pjmlp on Tuesday March 24, 2020 @02:12AM (#22672437)
Misconception is that IPC and external resources is always left out of the message, so anyone without experience in distributed computing assumes guarantees that Rust actually does not provide.
Re:Two Years with Rust by burntsushi on Tuesday March 24, 2020 @11:01AM (#22675162)
That's not a misconception. It's a totally different problem space.

> so anyone without experience in distributed computing assumes guarantees that Rust actually does not provide.

[citation needed]

Re:Two Years with Rust by hechang1997 on Tuesday March 24, 2020 @12:52AM (#22672074)
I don't think you can have shared IPC memory in rust. You have to use message passing. Of course you are on your own completely, and there will be weird logic bugs when you mess it up. However, there won't be any memory corruptions.
Re:Two Years with Rust by pjmlp on Tuesday March 24, 2020 @02:11AM (#22672429)
Sure you can, it is no different than mapping a FFI pointer inside unsafe code block, or doing a mmap like access.