Hacker News new | past | comments | ask | show | jobs | submit login

I agree with this but the ownership model is really a huge learning curve for somebody who wants to make an application where it's OK if it crashes when there's a bug.

It would be cool if there was a "relaxed rust" which provided interop with standard rust, but used some designated smart pointer for everything automatically (at the crate level, for example). I'm not sure how/if this could work, but I think it would make transitioning from GC languages -> Rust much easier.




You can more or less do this - just wrap everything in arc mutexes and clone everywhere (or use Rc for strictly single threaded). I'm sure someone will point out where it doesn't work but I suspect it would work fairly well but with obvious costs.


Exactly, but I'd like to see it done automatically (possibly via a special glyph enabled via crate config?), so that users of this "relaxed rust" don't have to think about ownership at all, but can still participate in the rest of the Rust ecosystem, and there's a clear "off-ramp" to standard rust.


D tried that. The fact that so much of its ecosystem non-optionally depended on the optional garbage collection was part of what killed its chances for adoption beyond "like Java or C#, but without a giant corporation pushing for it".




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: