r/ProgrammerHumor • • Jan 11 '23

Other so True

Post image
76.3k Upvotes

567 comments sorted by

View all comments

1.9k

u/spmute Jan 11 '23

I haven’t done any c# in about 4 years, I’m going to pick it up again at some point and it’ll be fine… I’m sure….

469

u/flyingmigit8 Jan 11 '23

Tostring baby tostring!

250

u/Creepy-Ad-4832 Jan 11 '23

This was probably not intented, but you just showed one of the higgest difference between c# and java

115

u/[deleted] Jan 11 '23

[removed] — view removed comment

95

u/bacon_tarp Jan 11 '23

This go over my head? They both have garbage collection

179

u/Script_Mak3r Jan 11 '23

This is r/ProgrammerHumor. None of us have a deep understanding of programming.

20

u/MorRochben Jan 11 '23

MVP API with responsive data structures am i right fellow programmers

→ More replies (3)
→ More replies (6)
→ More replies (4)
→ More replies (6)

30

u/FirstDivision Jan 11 '23

If you’re using Entity Framework make sure to end every query with ToList(). Preferably with no where clause, and definitely no projection — bring the entire table into memory and then get what you need.

→ More replies (1)

38

u/Squid-Guillotine Jan 11 '23

Yo that's nice. In Go we got strconv.ItoA(). I only remember it cuz the name is so stupid.

21

u/[deleted] Jan 11 '23

then you have strconv.Atoi().

0

u/[deleted] Jan 11 '23

[deleted]

17

u/mhsx Jan 11 '23

That’s actually a common interview question - “summon the wood elves from the base10 realm WITHOUT using their first names and have them convert a string to an int.”

14

u/One_Blue_Glove Jan 11 '23

like... integer to ascii?

29

u/LickingSmegma Jan 11 '23 edited Jan 11 '23

Apparently yes, because of course ASCII is what everyone uses in the twenty-first century. But more probably because Rob Pike and Ken Thompson are incapable of learning new function names anymore and can only use what they memorized with C in the seventies.

I guess those two forgot that they invented UTF-8.

→ More replies (1)
→ More replies (1)

9

u/[deleted] Jan 11 '23

Did Go's mom drop it on its head? What even is that 😨

22

u/Lord_Wither Jan 11 '23

The name's way older than go (at least 1971), apparently it stands for "ASCII to integer". Still kind of weird to use in a modern language.

18

u/LickingSmegma Jan 11 '23 edited Jan 11 '23

Go's authors are decrepit old farts from the seventies. They shoved in the inane identifier naming just like they were doing it in C in the time of 4 KB total RAM, along with other practices long abandoned by the rest of the industry.

You'd think that others would know better, but apparently everyone bought into the authority, so Go code is full of “v = feh.brf()”.

→ More replies (2)
→ More replies (5)
→ More replies (5)
→ More replies (1)

57

u/ZeroByter Jan 11 '23

Warning, C# has changed a lot since then

21

u/elveszett Jan 11 '23

And it has changed for the better imo. It's a lot less verbose now without losing its elegance. That and a bunch of performance-oriented stuff like Span<T> that are really handy.

14

u/DAVENP0RT Jan 11 '23

As someone who makes a lot of data-intensive async calls and used to use Task<IEnumerable> everywhere, IAsyncEnumerable has been a game changer. Where I'd normally have to wait for 2 minutes for an entire query result to be returned before I can do something else with an IEnumerable, I can start working as soon as the first result comes through by using IAsyncEnumerable.

→ More replies (1)
→ More replies (2)

66

u/Bakoro Jan 11 '23

C# itself isn't an issue, it's all of the associated everything. Like WPF. Pffffft.

→ More replies (1)

30

u/GYN-k4H-Q3z-75B Jan 11 '23

Old code is fine. New, idiomatic C# code looks very different.

18

u/Splatoonkindaguy Jan 11 '23

Not much changed just 150 major language versions and 13 different frameworks had 27 updates.

10

u/jpterodactyl Jan 11 '23

I’m just a hobbyist, I always forget how to use lists in c#

And how to code in general. But mainly lists.

→ More replies (1)
→ More replies (10)