4 ms·
Your comment doesn't seem like a helpful way to advocate for Rust. It's a critique of the comment but doesn't address the commenter's concerns.
by sidlls 10y ago
Your comment doesn't seem like a helpful way to advocate for Rust. It's a critique of the comment but doesn't address the commenter's concerns.
- pcwalton 10y agoBecause "addressing" the concerns would make Rust a worse language. 1. Removing structs and interfaces (in favor of what? Java-style classes and interfaces?) would make Rust more verbose, less of a systems language, and slower at runtime due to the indirect dispatch. 2. Changing the keyword "enum" to something else is a cosmetic change which would make as many users unhappy as it made happy. (We know, because we solicited feedback on the keyword before selecting it!) 3. I've addressed error handling in the sibling comment. There's basically no other way to do it that would be in line with Rust's goals as a systems language. 4. Rust would be a worse language if it lacked closures. Closure support is a basic feature in a modern language.
- sidlls 10y agoI didn't suggest changing the Rust language. There are other ways to address concerns than by saying "you're wrong," which is effectively what your comment did.
- soulbadguy 10y agoUnless the person actually happens to be... you know wrong... Which does happens sometime.
- mmstick 10y agoNothing wrong with pointing out that someone's logic is wrong. It is true that the only way to address these 'concerns' is to change Rust into something that it is not. Rust without closures, structures, traits, pattern matching, and algebraic data types would not be Rust, it would be C. We don't want C.
- soulbadguy 10y agoNitpick : > 1. Removing structs and interfaces (in favor of what? Java-style classes and interfaces?) would make Rust more verbose, less of a systems language, and slower at runtime due to the indirect dispatch. Classes and interface can be implemented without indirect dispatch...
- pcwalton 10y agoOnly if you monomorphize interfaces—which gives you Rust's traits.
- soulbadguy 10y agoNo. THe fundamental difference is that rust traits cannot convey structural information , classes (java and c++ can)
- steveklabnik 10y agoThere's an open (and desired) RFC for this. It's not likely to happen soon since it's not a super high priority, but I'd be willing to bet it gets merged in the future.
- soulbadguy 10y agoFair enough, as long as we agree that classes/struct in C++/java a quite a different beast than just monomorphic traits.
- steveklabnik 10y agoAbsolutely, you're totally right with regards to today.