Live data from Hacker News

From Stacks to Trees: A new aliasing model for Rust

ralfj.de

41–43 of 43 posts

Re: From Stacks to Trees: A new aliasing model for Rust

#41
post #3

Earlier quoted context omitted.

>"Does anybody else wish the compiler wouldn't" Compiler being obtuse and not being able to figure when it is safe to "break rules" is the problem. Not twisting brain of the programmer into being "safe compiler". This sounds like a Stockholm syndrome. >"you should be following immutable practices" No I should not. I should do what makes sense in particular situation and not bending over for some zealots trying to enf…

In C++ or C, you are always twisting the brain of the programmer into being a "safe compiler". I don't think that is an advantage personally. Lifetimes don't go away just because there isn't a borrow checker or way to define them in the source code.

I do not have this impression. As for managing lifetimes in modern C++ I've already stated elsewhere that from my personal experience this problem practically does not not exist for application level programming. People writing OS level code will of course disagree but luckily I am not in that domain. I do write code for low power microcontrollers but I use plain C and do not have any real problems as there are no allocations / freeing. Just be careful with interrupts when handling shared data.

Re: From Stacks to Trees: A new aliasing model for Rust

#42
post #15

Earlier quoted context omitted.

>"so maybe the complexity is not going to affect too many people" I think this approach shows a high level of disrespect for users.

I work with many people who are quite intelligent but early in their career or not domain experts in PL implementation. These people are perfectly respectable, but how long would it take to teach them how to map their source to the lifetime dependency tree with subtle rules in order to understand a borrow checker result that triggers an error? Without that understanding, a dev using rust would maybe try poking at the…

I have to apologize here. Not sure what was with my brain at the moment but I've misunderstood your entire original reply.

Re: From Stacks to Trees: A new aliasing model for Rust

#43
post #3

Earlier quoted context omitted.

>"Does anybody else wish the compiler wouldn't" Compiler being obtuse and not being able to figure when it is safe to "break rules" is the problem. Not twisting brain of the programmer into being "safe compiler". This sounds like a Stockholm syndrome. >"you should be following immutable practices" No I should not. I should do what makes sense in particular situation and not bending over for some zealots trying to enf…

In C++ or C, you are always twisting the brain of the programmer into being a "safe compiler". I don't think that is an advantage personally. Lifetimes don't go away just because there isn't a borrow checker or way to define them in the source code.

This isnt quite true, you can have memory-safe single ownership without borrow checking, and it feels quite different than what Rust has us do.
Post reply on HN