this post was submitted on 14 Sep 2023
405 points (80.1% liked)

Programmer Humor

19618 readers
783 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Wooki@lemmy.world 1 points 1 year ago* (last edited 1 year ago) (1 children)

Security, performance and most importantly, security. .net updates every week to address security vulnerabilities, stability and enhancements. While the language is lower you just can’t overstate poorly c# lasts. C# Deprecation and dated code make for a pretty high maintenance and frustrating ecosystem at the best of time.

[–] areyouevenreal@lemm.ee 4 points 1 year ago* (last edited 1 year ago) (3 children)

It being updated frequently just shows it's being regularly maintained and improved.

C# has many of the same security and safety advantages that Rust does given they are languages with memory management and other safety features built-in.

Rust has exactly the same problems with depreciation as many Frameworks rely on experimental features which are subject to change.

Edit: plus if you have ever used Rust it's a pain to learn and use compared to C#. C# is so similar to Java and so much easier than C++ that it's really not much of a jump for programmers new to the language.

[–] fuck_u_spez_in_particular@lemmy.world 1 points 1 year ago (1 children)

Rust has exactly the same problems with depreciation as many Frameworks rely on experimental features which are subject to change.

Rust has actually quite a good record with depreciation and backwards-compatibilty etc. They are changing the language in non-backwards compatible way over editions, but the changes are mostly very manageable.

But to not end up being another C++ (syntax-wise it's a disaster IMHO), a few non-backwards-compatible changes every few years are the way to go, when it's manageable.

[–] areyouevenreal@lemm.ee 1 points 1 year ago* (last edited 1 year ago)

What's so confusing about C++ syntax exactly? To me it seems to make a lot of sense given the languages history.

[–] fuck_u_spez_in_particular@lemmy.world 1 points 1 year ago (1 children)

Learning curve is steep in the beginning, I agree (I wouldn't argue painful though, maybe if you have to unlearn bad practices, like interior mutability though etc.).

But I think it pays off after some time. I'm now faster in Rust than in C# with similar experience, and the quality of the code is definitely higher as well (which can be credited to the strict kinda opinionated design of Rust IMO).

It composes really well, better than most (non-functional) popular languages. I think this is probably the Sell for Rust, as it additionally works remarkably well over the entire stack (kernel -> frontend) (in each abstraction level might be better/easier to use languages to be fair though).

[–] areyouevenreal@lemm.ee 1 points 1 year ago

What's interior mutability and why do you think it's bad?

I might have another try at rust some time in the future. I think I tried it in a bad situation having to use it for a web microsevices project when I had limited knowledge of the language. If it had been another language I probably would have been able to pick it up in the time frame required. Using it did cost me in terms of grades, and it was a poor decision to use that language at that time.

The main things I struggled with were all the borrow checking and asynchronous stuff, as well as the lifetimes concept. I still don't understand how you are meant to specify object lifetimes. In C you assign and free things manually, in Java and Python it's done mostly automatically, in C++ you choose manual or automatic when it's assigned. In Rust it seems it's automatic until the compiler can't figure it out and then it becomes manual, which is frankly bizarre.

[–] Wooki@lemmy.world 0 points 1 year ago* (last edited 1 year ago) (1 children)

.net is not secure, it’s so far from secure it’s a joke. 503 security patches this year alone, that includes one for each windows version but you get the point.

[–] areyouevenreal@lemm.ee 0 points 1 year ago (1 children)

Do you not think Rust also has security flaws? At least Microsoft patch theirs.

[–] fuck_u_spez_in_particular@lemmy.world 1 points 1 year ago (1 children)

There are of course security flaws, we're humans after all. Unless the compiler and the language can be proven mathematically correct at least.

But as described above, in practice the security flaws are easier to isolate in Rust compared to C# IME. The current story of security flaws in Rust is quite good so far.

[–] areyouevenreal@lemm.ee 1 points 1 year ago

The current story of security flaws in Rust is quite good so far.

That means nothing without knowing who said it. I find it hard to believe it's anymore secure the C# without security research saying so. It's a very complex language from what I understand with a lot of moving parts. It's also dependant on external frameworks in a way that C# just isn't. If you have a problem with .net there is a company behind it who is responsible. Who is responsible for actix web or seaorm?