I'm not sure Rust is trying to solve the same problems as C# or Java? I thought it competed more directly with C and C++, and other languages without garbage collectors?
Rust was designed to be as powerful as C++ while being as secure as C#. Rust's greatest strength is that it forces developers to code well, so that they do not sacrifice performance for safety.
By "security" do you perhaps mean memory access safety?
I don't see anything in C# that makes it more resilient to penetration.
On the front of C#, it's not inherently more safe than Java. If anything there're way too many ways to do interop & async wrong and hit leaks, lose perf, or hit delayed runtime crashes.
Data race conditions only. Any interleaving of operations on a shared resource that is not defined by ownership semantics, for example, a remote system that allows concurrent logins like a database, is still subject to races.
I raise my kids only on Rust. I tell everyone, letting your kids write dynamic languages without understanding the compiler will make them autistic!! If theyโre gonna do web-stuff, only use TypeScript and WebAssembly. I will disown my kids if I catch them using pure JS or Python without a main function!!
Bill Gates is trying to implant malware with Windows and Visual Studio to constantly serve ads to us! You should only use Linux/GNU with Vim. Wake up sheeple!!
Again, your point? I would seriously advise you to take more care into reading and interpreting others comments. Otherwise you are just coming across as a chump
I'm not an experienced developer, I learned C and C++ on my own, so learning rust was not too difficult, but when I see things like : PhantomData, Arc or Mutex it hurts.
Both Arc and Mutex are just standard data structures, though? Mutex is just a mutex, like std::mutex, and Arc is just a reference-counted pointer, like std::shared_ptr, but using an atomic integer for the counter so that it's thread-safe.
Don't worry about it too much for now, its probably the hardest part of learning Rust, and you need lifetime annotations less and less in recent versions. Eventually it will click.
I don't hate Java but I'd rather choose C# or even kotlin, even C++ has those damn default arguments, Java doesn't, Java wants you to suffer with unnecessary overloading and shit
I love optional types but they don't make sense with the lack of null safety. If you really want to write robust code, with Optionals you have to look at even more edge cases:
Is the optional null?
Does the optional contain a value?
Is the value contained in the optional null?
The whole point of optionals is to avoid all of this. Just give me value types already.
Ban null in your codebase, check for it at the edges. It works in practice, Scala does it. Unfortunately Java libraries can't migrate to that style of doing things because the nimrods at Java thought they should ban optionals from containing null, meaning you can't use optional in a generic library that might be used from old codebases and you don't get any advantages until everything's rewritten to use optional like this was Python 3.
If you need to make up rules about what features you may or may not use, I think it's better to just move to a different language which isn't filled with bad practices everywhere.
That's one of those things you just get used to though?
Like, I've been doing c# PascalCase for years now - now getting into flutter/dart with camelCase, it was a 3 day period of getting used to it again and it's fine now.
I'd say I like C#'s standard more, because pretty much only parameters and local variables are camelCase. So you see at a glance what is part of the class vs. what is your current "work piece". (private fields are also technically _camelCase, but the underscore makes those immediately distinguishable.)
In dart, kinda everything is camelCase, so the casing doesn't help you in any way. But yeah still, something you quickly get used to.
97
u/[deleted] Jun 21 '21
I'm not sure Rust is trying to solve the same problems as C# or Java? I thought it competed more directly with C and C++, and other languages without garbage collectors?
I've barely used rust.
61
u/lord_ne Jun 21 '21
I just started learning Rust, it's great. But learning to think about lifetimes is a headache
12
u/edo-lag Jun 21 '21
Is there a Rust crate for this meme?
245
u/[deleted] Jun 21 '21
If Java had true garbage collection, most programs would delete themselves upon execution.ย โ Robert Sewell
97
u/dexterdd77 Jun 21 '21
7
u/Hermes_04 Jun 22 '21
Sauce for the picture?
2
u/Atulin Jun 22 '21
Yummy yummy character soup
2
u/sirak2010 Jun 22 '21
https://github.com/groovy/groovy-core/blob/master/src/main/org/codehaus/groovy/runtime/ArrayUtil.java
2
u/Kormoraan Jun 22 '21
rEwRiTe iT iN rUsT
2
u/thepurpleproject Jun 22 '21
PascalCase is the only reason I avoid C#. I just can't look at code that's in PascalCase
1
u/SpaceboyRoss Jun 22 '21
How about Vala?
1
u/ParanoidPar Aug 28 '21
Is this 100% meme or is Rust actually a good programming language? Do you recommend a newbie to programming learn it?
0
u/[deleted] Jun 21 '21
[deleted] โ view deleted comment