this post was submitted on 14 Mar 2024
1281 points (98.5% liked)
Programmer Humor
19602 readers
874 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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I got my first software developer role last year and it was the first time I’d written C#, I was more TypeScript. Now we use both but I must say I really like C# now that I’m used to it.
I think most programmers would like C# if they spent time with it. It is getting a bit complex because the joke about it over borrowing from other languages is on the money. It is a nice language though and pretty damn fast these days all things considered.
There's too much MS in the language and runtime for me. The fact that it gives my Linux programs DLL files and the fact that by default the SDK phones home makes me run away in horror from not only writing it but also running other projects written in it.
even nicer is F#. join us brother, you can do everything that you can do in C# but better
What does it offer that would make it better? Just curious and I’m not in a position to change out tech stack at work though.
The biggest selling point about functional languages for me is the type system, mainly algebraic/union types (which imo Scala does the best), pattern matching (and imo Rust does this best), and the incredible type inference, but also all the functional features. But I think the best part about F# specifically comparing it to C# is the removal of a shit ton of the boilerplate. Plus data is immutable by default, always a nice touch.
For F#, the special types may not be super relevant when interacting with C# libraries, but in general you can do everything in F# that you can do in C#, including all the OOP. It's just an added bonus that you basically get enums on steroids and pattern matching.
I find that writing in F#, even if I write basically the same code I would in C#, speeds up my design/programming a TON and makes it significantly more maintainable and easy to navigate. There's a lot less clutter and you don't have to worry about the layers upon layers of repetitive boilerplate.
The only downside IMO is that F# can have some terrible error messages. And of course, you have to learn F# syntax which can be a small pain if you've never used ML or Haskell (especially when it comes to function call syntax). But if you're mainly interfacing with C# libraries then it's no big deal. I started making an application only utilising C# libraries (mainly DB stuff) the same day I started using F# and it went relatively smoothly, although probably because Rust is the main language I used then.
This resource might help, although I can't say it's enough to completely learn the language: https://fsharp.org/learn/