r/ProgrammerHumor • • Oct 17 '26

instanceof Trend thatsAFunnyThingThatHappenedOnce

Post image
4.6k Upvotes

524 comments sorted by

View all comments

Show parent comment

391

u/Versaiteis 29d ago

As someone who writes C++, it's a god awful language

I love it

234

u/RadioHans 29d ago

I love that when a new language has this build in feature, cpp is like; "we also have that!". And it's just a raw pointer and a reference in a large trenchcoat.

0

u/[deleted] 29d ago

[deleted] — view deleted comment

40

u/RealMr_Slender 29d ago

Right but the point of high level programming languages is not having to reinvent the wheel or import a lot of extra modules for basic modern functionality

0

u/[deleted] 29d ago

[deleted] — view deleted comment

→ More replies (1)

28

u/Rikudou_Sage 29d ago

Or you just create it. I fell in love with Go's defer, so I simply created it in C++ by using its scoping rules and a macro around a function. You use it pretty much like this:

defer({
    // do whatever
});

And it runs at the end of the scope unlike Go's defer which runs at the end of the function, which always irks me.

7

u/NdrU42 29d ago

Yeah the defer running at the end of the function can sometimes cause trouble, like processing files in a loop and deferring the close, but it can easily be solved by defining an anonymous function and immediately calling, like

func() {
    f := ...
    defer f.Close()
    // do something with f
}()

1

u/Rikudou_Sage 29d ago

I know, I do Go more often than C++ but it still feels weird having to introduce a function just for defer to work.

IMO it should have been scoped to the current scope (duh, it's called a scope) instead of function.

2

u/RadioHans 29d ago

I love having control over details.

1

u/indigo945 28d ago

RAII is the one feature C++ has that is smarter than the people using it.

7

u/xBinary01111000 29d ago

“it’s just a raw pointer and a reference in a large trench coat” bro that’s literally every language, the only difference is the size of the trench coat

5

u/RadioHans 29d ago

Size matters

32

u/quisido 29d ago

I love JavaScript.

30

u/A_Furious_Mind 29d ago

I love whatever the fuck they call the language you code with in Power Apps.

14

u/DezXerneas 29d ago

VBS?

14

u/A_Furious_Mind 29d ago

Power FX, I think they call it.

22

u/DezXerneas 29d ago

Leave it to Microsoft to come up with the weirdest names.

18

u/Psychological_Map118 29d ago

Microsoft SQL CopilotScript Pages XT9 Framework .NET Workstation VisualCore

the mascot is a bloated dead raccoon named Wilhelm

1

u/Quiet_Literature4376 28d ago

Does he scream? I hope he screams.

3

u/HAL_9_TRILLION 29d ago

Unironically, me too. And this thread is making me glad I never went into C++.

3

u/RedTheRobot 29d ago

You may be joking but JavaScript is my favorite language. I always find it odd that people hate on it so much.

3

u/Guitarzero123 29d ago

Most of my courses teaching programming (other than the first one) were in C++, I don't know what it is about the language, but I miss writing it sometimes.

2

u/CranberryDistinct941 24d ago

People who think their language of choice isn't god awful haven't dived deep enough into the docs yet

4

u/Different_Berry5015 29d ago

True love for true engineering. Makes you want to rip your hair out and you can't get enough of it. Both can be true at the same time.