Hacker News new | ask | show | jobs
by nyanpasu64 1587 days ago
Rust's Send/Sync made multithreading easier, teaches people to write proper multithreaded code, and results in more reliable programs with less data races and race conditions. Rust's dependency managers makes dependencies easier, teaches people to add dependencies and transitive dependencies, and results in programmers not understanding their own programs.

I think that building tools to teach better programming (eg. teaching memory-safe programming or safe languages, teaching patterns immune to SQL injection or parsing exploits) is a great thing. But given the choice between bad and no code, I feel that it's almost better for people to not complete projects, than to release code with serious functional errors (memory leaks and segfaults and dozens of runtime race conditions that each show up every month or so, requiring herculean effort to debug, or more often go unsolved and haunt users indefinitely) or security defects (eg. https://lukeplant.me.uk/blog/posts/wordpress-4.7.2-post-mort...).

It's obviously better to teach good coding than to discourage people doing bad coding, but it's a lot harder (Send/Sync was a non-obvious innovation, and Rust required immense effort to push to 1.0 and build an ecosystem) and I don't think I can do it. And I'm opposed to the principle of trading off your understanding of a program to get more functionality from leaky abstractions (complex languages, optimizing compilers, big library trees, and GPU drivers all leak, whereas out-of-order CPUs and cache hierarchies are a mostly non-leaky abstraction).