this post was submitted on 26 Apr 2025
130 points (97.1% liked)

Programmer Humor

35334 readers
311 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
top 22 comments
sorted by: hot top controversial new old
[–] KingThrillgore@lemmy.ml 6 points 1 day ago

Ima sorry Unity programming language

[–] uberstar@lemmy.ml 1 points 1 day ago

Java but in an alternate universe (with Microsoft's trademarked curse^tm^ that follows everywhere). Auto-properties/properties to reduce boilerplate, extension methods, simplified exceptions (I don't care about being explicit about checked/unchecked exceptions, I just want to throw em and catch em whenever I feel like it! Then again, other languages don't want you to care about any of that either), Linq and access to the wonderful world of the GAME DEV ecosystem (Unity, Godot). Anything other than that is just splitting hairs at this point.

[–] pastermil@sh.itjust.works 1 points 1 day ago (1 children)

I have never of anyone calling C# Java.

[–] pinball_wizard@lemmy.zip 4 points 1 day ago* (last edited 1 day ago) (1 children)

I have never of anyone calling C# Java.

Sounds like you missed the fun of it's first release. We (C# developers) all called it Microsoft Java.

Edit: I remember answering the question "What the hell is C#?!” with: "It's Microsoft Java".

It gave folks new to the language all they need to know: It aimed to solve the same problems as Java, and didn't have Sun's commitment to Open Source behind it.

[–] pastermil@sh.itjust.works 2 points 1 day ago

I must be new to the scene compared to you folks!

[–] masterspace@lemmy.ca 18 points 2 days ago* (last edited 2 days ago) (4 children)

C# is just flat out objectively a better language, in virtually every single way

[–] jerkface@lemmy.ca 6 points 1 day ago

In much the same way that McDonald's is better than a mud pie.

[–] turnip@sh.itjust.works 2 points 1 day ago (1 children)

I don't understand why any VM language is widely used. Running on every OS makes no sense to me when you could just compile it for other OS, was there some other reason?

[–] pinball_wizard@lemmy.zip 1 points 1 day ago

was there some other reason?

Compiling to an additional OS, today, can be a pain in the ass.

Compiling to an additional OS, a couple decades ago, was a monumental ongoing never ending pain in the ass.

[–] Ephera@lemmy.ml 3 points 2 days ago (3 children)

Eh, I'd argue that Java and C# are in the niche of having few features. While I don't like this niche, Java having even less features makes it stand out more in this niche. If you're looking for a language with more features than that, then there's so many more feature-rich choices than C# that I just don't feel like you'd choose C#, unless you want Java with integration into the Microsoft ecosystem.

[–] masterspace@lemmy.ca 7 points 2 days ago

I'm not talking ecosystem or which I'd choose to build an actual project with, just on a pure language basis, C#'s typing system is more flexible and less verbose than Java's, and unlike Java, C# actually treats functional programming as first class.

Java has certainly gotten better in both regards, but C# was really just a joy in comparison.

[–] ThirdConsul@lemmy.ml 4 points 2 days ago (1 children)

Out of curiosity, could you give me an example? I usually think the opposite whenever I interact with other languages?

[–] Ephera@lemmy.ml 3 points 1 day ago (1 children)

Well, on the JVM side of things there's Scala and Kotlin. Scala supports all the object-oriented paradigms + the functional paradigms. Kotlin supports about the same number of features as Scala, although it puts more restrictions on them. On the Microsoft side of things, I've never tried it, but I'm guessing F# has to cover a similar object-oriented + functional feature set. Well, and from what I've heard about C++, it's presumably the language with the most features across all languages.

[–] ThirdConsul@lemmy.ml 2 points 1 day ago* (last edited 1 day ago)

C# covers all feature of functional programming that comes to mind from Go (edit: not Go, what was it, Haskell?).

Traits? Done. Monads? Done. Functions as params? Sure. Closures, errors as values, whatever you want.

What are the specific language features you're looking for or think are missing in C#?

[–] tias@discuss.tchncs.de 4 points 2 days ago* (last edited 2 days ago) (1 children)

Well it's always about finding a good balance isn't it. Too many features like in C++ has negative consequences. Preferably you want something that lets you do all that you need to do, but not more. The trick to designing a good language is to let developers achieve as much as possible with as few features as possible, while keeping the code easy to reason about and understand.

This is obviously both subjective and highly dependent on what problem you are trying to solve, but I can't think of any situation in my career where C# would not have been a better a choice than Java from a strictly technical perspective. It's not just that the C# language is better, it's that the Java ecosystem is founded on poor design choices that result in code bloat and implicit behavior that is hard to troubleshoot and secure. See e.g. Spring, which automatically picks up and loads any logging library that happens to be in the user's path, even if that is an exploitable version of log4J. Java has become corrupted by enterprise architects. This satirical project demonstrates what I mean.

I say this as someone who is currently developing a FOSS Java library in my spare time, out of frustration with the Java code I had to endure at work.

[–] MyNameIsRichard@lemmy.ml 1 points 2 days ago (1 children)

I dare say that you could replicate the same mess in C#, PHP, Python, C++, or any other object oriented language. Just because people write bad code, it doesn't mean the language is bad.

[–] tias@discuss.tchncs.de 1 points 1 day ago* (last edited 1 day ago)

Sure, I didn't claim that the bad ecosystem makes the language as such bad (although it is still bad, for other reasons). It's just an additional disadvantage of developing software on the Java platform.

That said, I do think some of the bad code out there is an effect of trying to work around flaws or missing features in the language. Libraries like Spring add an additional configuration layer that is practically like an additional language on top of the base language. Instead of coding Java, you're coding Bean configurations and filter chains. Unfortunately all of that comes without useful debugging tools, so you're left scratching your head why the system isn't doing what you want. Log4J is another such complex configuration system that - unfortunately - customers are encouraged to change themselves which leads to confusing failure modes and insufficient user interfaces.

[–] m532@lemmygrad.ml -2 points 2 days ago* (last edited 2 days ago)

Wrong its by microshit that makes it worse

Also java is better designed

Also java doesnt have builtin sql like shit, I hate SQL

Also java has intellij

C#s capitalization scheme is also stupid

[–] bad_news@lemmy.billiam.net 5 points 1 day ago (1 children)
[–] pinball_wizard@lemmy.zip 2 points 1 day ago

Thanks. I hate being reminded about J#.

[–] atomicbocks@sh.itjust.works 7 points 2 days ago (1 children)
[–] pinball_wizard@lemmy.zip 2 points 1 day ago

It's weird to me that there isn't a full four paragraph rant in the Wikipedia article about J# - just complaining about how everyone's first "Hello World" was guaranteed to fail to compile due to bugs in the file rename algorithm.

The usability failures in J# are the stuff of legend.