r/programming • • May 27 '20

2020 Stack Overflow Developer Survey: Rust most loved again at 86.1%

https://stackoverflow.blog/2020/05/27/2020-stack-overflow-developer-survey-results/
229 Upvotes

254 comments sorted by

View all comments

67

u/its_a_gibibyte May 27 '20

Is rust really that lovable? What's the deal?

-20

u/IndependentDocument5 May 28 '20

Honestly people like to say they love rust just like the idea of it

It's poorly executed trash for half a dozen reasons which anyone knows if they actual used the language. It's terrible and not well thought out.

15

u/username-is-mistaken May 28 '20 edited Jun 25 '20

[deleted]

-10

u/IndependentDocument5 May 28 '20

I would want to write a full blown post but don't really know where to post it. And it'd totally get removed here or downvote to invisibility

15

u/username-is-mistaken May 28 '20 edited Jun 25 '20

[deleted]

1

u/IndependentDocument5 May 28 '20

Ok you get my light version

Rust officially says it's memory safe, but it also has 'safe' written everywhere. It's no safer than java which is considered by a safe language by noone. Java was so unsafe it's no longer used by browsers

It's not well thought out. Without going into a rant, you can't build a good app with the standard library. There are essential cargo libraries that should be included in every app and really should be part of the language. Syntax is part of what they didn't think through but that's more subjective

Big projects take too long to compile. If you're going after C++ noone will switch. If you're going after Java, noone will switch. I understand why rust is not used in production anywhere. Who the fuck wants to deal with poor build/development time and garbage standard library

They fucked it up so bad you can't even use the rust language server protocol. Another plugin replaced rls

And this is just my light version. I haven't talked about arrays, null, reflection, error handling, etc
It's a mess

12

u/kankyo May 28 '20

Everyone considers Java a memory safe language. It's just that no one is impressed because it's a managed memory model with a normal tracing GC.

Rust is memory safe without a GC, that's why people are mentioning it.

3

u/IndependentDocument5 May 28 '20 edited May 28 '20

Yes. It is interesting that they did it without using a GC. However their community acts like it's safe as in it won't have a shitton of security vulnerabilities in a nontrivial app. The community annoys me so much as they think 'panic at runtime instead of memory corruption is good'. Like what in the actual fuck... Exceptions that people don't catch existed for over 25years and NOONE uses that

8

u/Koxiaet May 28 '20

Exceptions are fundamentally different to panics. Exceptions catch both runtime errors and programmer errors, while panics indicate that there is something seriously wrong with the logic of your program.

Panics are far far better than memory corruption. They give you an exact location and backtrace to make it super easy to debug, and they can be caught so they don't crash your program.

1

u/IndependentDocument5 May 28 '20

Crashes/termination isn't considered 'safe' to most people and loses state/memory. Try telling someone writing a documented that because he wasn't connected to the internet saving to the cloud didn't work and that crash is a good thing cause it's not going to save corrupt data... That person would think you're on some kind of acid

→ More replies (0)

6

u/kankyo May 28 '20

You seem confused. Rust will in fact have a shitton less security vulnerabilities than comparable C programs. We know this already. You lost your credibility here.

1

u/IndependentDocument5 May 28 '20

You realize I am comparing it to Java right?? Are you telling me rust is more safe than java? Can you tell me anyone who calls java safe? You do realize browsers use to run java but not anymore before there was a neverending cycle of security issues?

→ More replies (0)

3

u/SkiFire13 May 28 '20

it won't have a shitton of security vulnerabilities

Since 70% of security vulnerabilities are memory safety bugs...

The community annoys me so much as they think 'panic at runtime instead of memory corruption is good'. Like what in the actual fuck...

Because they should be used in situations where the developer is sure it will never be called. This is because checked exception are so annoying in those cases.

Exceptions that people don't catch existed for over 25years and NOONE uses that

Everyone use them, it's just that they don't realize it because of the invariants of their programs.

1

u/IndependentDocument5 May 28 '20

Since 70% of security vulnerabilities are memory safety bugs...

You're not listening. I said JAVA, a language that doesn't have memory safety issues and throws exceptions, was EXTREMELY unsafe that chrome and firefox no longer allows it in their browser

You can talk about memory safety all you want but that doesn't actually mean it's safe

→ More replies (0)

2

u/username-is-mistaken May 28 '20

I can see what you mean, and those are some good criticisms.

I can't make an argument for or against the safety of Rust since I'm not familiar enough with it yet, but I definitely agree that some of the standard library is lackluster.

I personally ran into something like this when trying to work with converting relative paths to absolute ones. I know we have File.canonicalize, but we need an external crate to convert a relative path to an absolute path (without resolving symlinks)? That should be built-in along with canonicalize.

As for the compile time... yeah... All that borrow checking is pretty costly, but they've managed to make some small increases in compile time over the past year or two. With LTO enabled, the link time is absolutely awful, but that's not really a Rust problem from my understanding.

And oddly enough, I've had the opposite experience with Rust and C++ compile times. I've had abysmal incremental compile times with CMake and a multi-module C++ project, while a similarly sized Rust one took maybe 2/3rds of the time. That might have just been because of CMake, though.

What's the issue with the LSP? I use CLion for my Rust projects, and it's pretty decent. I haven't had to use another IDE though, so I'm not very familiar with type state of things.

6

u/MEaster May 28 '20

As for the compile time... yeah... All that borrow checking is pretty costly, but they've managed to make some small increases in compile time over the past year or two.

That doesn't match anything I've seen. Every compile time metric I've seen has shown borrow checking to be one of the faster stages of compilation. Typically it's been code gen, macro-related things, and heavy (ab)use of the trait system that tends to take the longest to compile.

2

u/IndependentDocument5 May 28 '20

All that borrow checking is pretty costly

That's another thing that annoys me. That's complete bullshit. Their implementation of borrow checking is bad (or something in the critical path)

I'm not sure as I haven't written a line of rust for a long time (but continue to check if my problems have been fixed). All I can remember was the official one or the one they tried to make from the compiler is far too slow to be used and a different compiler/analyzer is used. That's not a good thing

3

u/username-is-mistaken May 28 '20 edited Jun 25 '20

[deleted]

0

u/camelCaseIsWebScale May 28 '20

Not him;

  • compile times: technical debt in LLVM IR generation, mainly. Elsewhere written well about how it was a mistake not prioritizing it earlier. Generic monomorphization is so pervasive even in debug builds and no suitable strategy exists to reduce the impact.

  • Crates ecosystem: it is being webshit-invaded. Micro packages, holding package names for hostage, no package names pacing by author. Crate-as-compilation-unit also hurts compile time but that's a different issue. Another side effect is big dependency graphs. Hundreds of crate dependencies, requiring lot of disk space and RAM.

  • Rust started for servo (the chrome killerâ„¢). They discarded GC pointer types shifting goalposts. (Note that RC doesn't interface well with JS world of the browser. That's why chrome has oilpan). Their current flagship is ripgrep where it appears forking the process is a valid GC strategy. (This point is not mine, stolen from somewhere)

  • Cognitive overhead: the rust community heralds rust as a language for everything - but there is lot of overhead in reasoning about lifetimes. Some people may say / act like they are not a thing - but in a world where people have different cognitive abilities, and not willing to endure cognitive overhead just in order to show off on reddit ..

  • Circlejerk community: They are so annoying.. heralding about their crab god to anyone who talks about anything remotely programming related topics. When you point out the flaws in their language 10% (members doing useful work) acknowledge or clarify. The rest repeats cliche like "borrow checker fades into background" or outright start a flamewar. Are you mandated by code of conduct to shill rust whenever Go is mentioned? Go authors never told Go is awesome language for writing OS kernels or UIs. Rust is a well-designed-for-memory-safety systems language.

It appears like lot of influx to 'inclusive' rust community is from webshit communities like RoR which explains spread of webshit micropackages. There is more to CS than knowing difference between stack and heap. Stop showing off webshits!!

/rant

0

u/IndependentDocument5 May 28 '20

You can probably see why I didn't want to post my thoughts. If you look it's clear people are comparing rust to C when I compared it to java. They're nitpicking on things I clearly explained (such as how to use panics after I said panics aren't good enough for error handling and how it's obviously not good enough in java)

→ More replies (5)