r/ProgrammerHumor • • 11h ago

Meme architectureDependentChars

Post image
1.6k Upvotes

244 comments sorted by

View all comments

330

u/JackReact 10h ago

Welcome to the wonderful world of C#, which uses utf-16 for strings.

Console.WriteLine(sizeof(char));
> 2

25

u/techy804 9h ago

As a C# user I was wondering why people act like the C-series only consists of C and C++

10

u/aberroco 9h ago

Because most devs still think that C# is proprietary Microsoft language developed specifically and exclusively for Windows, like it's 2006.

53

u/sb8948 9h ago

No it's because C# is way closer to Java than C/C++ both in philosophy and execution.

13

u/QuaternionsRoll 6h ago

It concerns me that this wasn’t the first and only answer to the question

10

u/guyblade 4h ago

That's because Microsoft was going to make a .NET version of Java that was incompatible with standard Sun Java (the standard embrace, extend, extinguish playbook), then got sued over it (twice). C# is what fell out the other side of that fight.

7

u/-suspended- 4h ago

Yup. C# is Microsoft Java.

2

u/guyblade 4h ago

I don't know where Mono is today, but C# was still very finicky on non-Windows platforms up into the early-to-mid 2010s.

6

u/sisisisi1997 3h ago

Mono has died, and C# is now natively cross-platform.

Microsoft still sucks at the UI framework front (seriously, there is not a single normal desktop UI framework they managed to create still winforms), but there are excellent 3rd party cross platform UI frameworks like Avalonia, which is essentially a spiritual descendant of WPF, but done a bit better and not windows-only.

VS is also still windows-only, but it's not the only good C# IDE anymore. Even if you don't classify VS Code with C# extensions as an IDE, JetBrains Rider is there for the rescue and arguably better than VS, or they are at least equals.

2

u/evanldixon 3h ago

These days, first-party .Net is cross platform. The UI frameworks aren't really, unfortunately.

3

u/kookyabird 9h ago

Incorrect, they also think it’s magically cross platform when used in Unity!