What are the main differences between Rust and C++? What are these languages used for in the real world?
Why you make the same thread again?
rust - rewriting things written in c++c++ - writing things to be rewritten in rust
>>102448132vercel rewrote their go stuff to rust though
>>102448109Rust has a standardized packaging and build system while C++ has multiple of both. C++ is object-oriented, to share behaviour in non-generic code you inherit from some base type, specified at type definition. Rust isn't, to share behaviour you define a trait that you implement on types you want.Rust is more explicit, you need to create a reference to a local value yourself in the caller, while C++ will just auto convert it. In generic rust code to use anything from a generic type you need to bound it at the front to make sure it has that. In generic C++ code the compiler will try to instantiate/guess generic code until it completely runs out of options. This created SFINAE, which basically makes the type system itself turing complete and is a logic/functional programming language in itself, but instead of folding on values you're folding on types.Rust's type system includes lifetimes which allow you to include existence relationships, ie. while this exists that has to existRust has a borrow checker which ensures references are always valid without a GC and all the lifetime rules are followed, C++ has no such mechanismRust doesn't allow a few potentially-unsafe operations unless you explicitly opt in by using an unsafe block. The goal is to separate the code compiler cannot check, create an interface with the conditions it requires, then have them enforced by the compiler
rust: how much do we need to pessimize C compiler (e.g. make large subset of valid syntax illegal to write, because... reasons) to remove memory bugs.rust is a penis cage of programming language that prevents fucking around with memory.
>>102448109C++ is tolerable, programming Rust is like cutting grass around a forest of trees using an electric mower and you can never run over the power cord..Well, that's what my friend told me.
>>102448119I didnt? i think ur going about another dude. I made a thread a few weeks back asking why is rust bad.
>>102449876/thread
>>102450100Can you please elaborate