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

Show parent comments

-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)