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

It might be weak, but I think every browser engine makes do with what they have available fairly well…


Given the fact that Mozilla is the primary sponsor of Rust, and Rust has been sneaking its way into Chrome as well, I'd say the authors of those browsers disagree with you.


I'm not them, but I suspect that they're slowly switching not because of its slightly better abstract data types but because it offers better memory safety.


Those are one and the same. The ADTs are how the shape and validity of the data is described to the compiler in a lot of cases. Rust wouldn't be able to be memory safe without it.

C++'s ADTs are easy to subvert even accidently; Rust's can't be without explicitly calling it out as unsafe.

It allows you to describe transformations of state in a formal set theoretical way. You should check out formally verified software like CompCERT and sel4 and their heavy use ADTs internally to achieve that. Rust obvs isn't full formally verified but it's a neat 80/20 in that direction.




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

Search: