Live data from Hacker News

Memory safety absolutists

itsallaboutthebit.com

271–272 of 272 posts

Re: Memory safety absolutists

#271
post #108

Earlier quoted context omitted.

> I was not aware of the antagonism from the Zig .. people to Rust, but it makes absolutely no sense. Lol, have you ever watch Andrew Kelley speak? I've only seen 3 or 4 talks he's given, but he frequently makes not-so-subtle digs towards Rust. Zig's home page prominently displays "Focus on debugging your application rather than debugging your programming language knowledge" which sounds horrible to me, but is clearl…

“Focus on debugging your application rather than debugging your programming language knowledge” to me sounds like it is directed primarily at C and C++., it’s a much more direct translation.

I don't see how that's possible. It's clearly stating that zig is not in the static (compile-time) safety checking camp. The message is, don't ensure correctness at compile-time, find your errors in the debugger. C++ doesn't force you to use RAII. C has nothing of the sort. Only Rust (of the major, currently fashionable languages) has a borrow checker that has a well-deserved reputation for having a steep learning curve, and no easy way around.

Re: Memory safety absolutists

#272
post #270

Earlier quoted context omitted.

If you're offering a new package manager up for installation (which, Steam aside, isn't the kind of thing that's normally practical to put inside a Flatpak sandbox) on a platform where every distro has its own package manager and repository, what would you propose? There's a reason they offer "download and run this .exe" on Windows and "download and run this .sh" on POSIX platforms. ...plus, as they mention in the ti…

Sorry, that others are equally bad is not an excuse, and also not that Rust's design makes it more difficult to package. Either you care about security or you don't.

My point is that your argument is comparable to faulting Ford for making cars disposable with crumple zones when nobody else has found a better way to meet the crash-safety requirements while satisfying the other requirements too.

As for "and also not that Rust's design makes it more difficult to package", give https://blogs.gentoo.org/mgorny/2012/08/20/the-impact-of-cxx... a read.

TL;DR: It's not a Rust thing. C++ suffers from the same problem when you use templates in your APIs... it just emits a .so file with no contents if you expose only templated APIs. It's fundamentally a problem of "Unless you're willing to spend Swift-level engineering money and still accept compromises Rust and C++ can't afford, dynamic linking in the presence of monomorphic generics is a problem even research languages haven't solved".

...same as the warts in async Rust. What you're seeing is a cutting-edge language slamming up against the limitations of what cutting-edge programming language research has figured out.

At least, with Rust, you've still got the dependency tracking and automatic RUSTSEC advisory tooling you don't get with header-only C libraries.

Post reply on HN