Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'll admit that I like Rust, but this seems like an odd take to me. "Not distracting me with type errors" seems directly at odds with "safer overall", especially for a missile launching system. That sounds like a recipe for "Whoops, there goes New York, but at least the code looked nice".


The catch here is that not all type errors are errors. I'm not arguing here against a typesystem, just against overly strict typesystems.


Rust typesystem has its place in many soft realtime / system programming domains.

Problem is people trying to push it as one true solution. But that's a human problem.


I would interested in seeing an example of what sort of type errors you mean. IME, the Rust compiler does a great job of catching actual mistakes in the type system, such as with Send/Sync. It also pretty easily lets you tell the compiler "no, I know what I'm doing" and say "unsafe impl Send for Foo {}" to do it anyways.


I'm talking about the sort of type errors you get when you try to implement a doubly linked list in safe Rust.

https://rust-unofficial.github.io/too-many-lists/


IDK, I think this quote from your link sums up my attitude towards that:

> Linked lists are as niche and vague of a data structure as a trie. Few would balk at me claiming a trie is a niche structure that your average programmer could happily never learn in an entire productive career -- and yet linked lists have some bizarre celebrity status. We teach every undergrad how to write a linked list. It's the only niche collection I couldn't kill from std::collections. It's the list in C++!

> We should all as a community say no to linked lists as a "standard" data structure. It's a fine data structure with several great use cases, but those use cases are exceptional, not common.

I have never in my professional career used or to my knowledge relied upon a singly-linked list, to say nothing of a doubly-linked list. That feels like picking something to be contrarian, not because it exemplifies a good case of where Rust is too strict. Just use a Vec? It's way more performant anyways.




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

Search: