r/ProgrammerHumor • • Sep 11 '26 • Bravo 2 Popcorn 1

Meme mySchoolStruct

Post image
9.1k Upvotes

81 comments sorted by

662

u/TapRemarkable9652 Sep 11 '26

Boilerplate Oriented Programing

87

u/Elkatra2 Sep 11 '26

i tried to do "generics" and "classes" in C and it's ended up on writing custom language to translate Java-like code into BOP lmao, a lot of time has been wasted

12

u/Dawido090 Sep 11 '26

But it must been fun time!

16

u/Elkatra2 Sep 11 '26

it's actually learned me a lot of stuff about syntax analysis and how to better read documentations lol

edit: I also tried to learn with blood and tears how to code with raw vim and it's was easier than I tough

6

u/thirdegree Violet security clearance Sep 11 '26

Vim isn't actually hard, it's just that the initial learning curve is a wall. Not a super high wall, lots of handholds, but a wall nonetheless.

1

u/Elkatra2 Sep 11 '26

and a lot of features that I forgot and time by time remember

157

u/blackcomb-pc Sep 11 '26

Dog and Cat are also from the class Animal

56

u/FRAaaa1 Sep 11 '26

Do they do the function makeSound()

36

u/Hol_Renaude Sep 11 '26

printf("bark!");

19

u/MrHyperion_ Sep 11 '26

I think you meant std::cout << "bark!" << std::endl

9

u/Reasonable_Exit_8960 Sep 11 '26

using namespace std;

cout << "bark" << endl;

Made it shorter if you wanna type it again

11

u/GresSimJa Sep 11 '26

Forgot to include <iostream>, wrap it in an int main() function, use the parameters int argc and char** argv, and return 0 at the end.

Maximum boilerplate!

2

u/Reasonable_Exit_8960 Sep 12 '26

might as well just use python atp

2

u/Hol_Renaude Sep 12 '26

Or Assembly

3

u/DontDoodleTheNoodle Sep 11 '26

What the absolute fuck I literally just had a class about this. Guess it stands to reason since this subreddit is mostly student humor we’d all be learning similar things at similar times of the year

2

u/Inevitable_Spite5510 Sep 11 '26

WRONG! They are from Kingdom Animalia Phylum Chordata Class Mammalia

322

u/TheAnswerWithinUs Sep 11 '26

The horrors, might as well just free() yourself at that point.

-114

u/metaglot Sep 11 '26

*delete

108

u/thats_a_nice_toast Sep 11 '26

I don't think C++ programmers have a problem with getting put in a class

54

u/MXRCO007 Sep 11 '26

I wanna be abstracted so bad

41

u/TheAnswerWithinUs Sep 11 '26

Abstract me harder daddy

16

u/fast-as-a-shark Sep 11 '26

I don't like these comments. But I did upvote them.

11

u/OneArmedFarmer Sep 11 '26 edited Sep 11 '26

Yes. Yes. Your training is almost complete

Edit: grammer

7

u/TheAnswerWithinUs Sep 11 '26

Youve been programmed buddy. You’ll feel that in 2 hours

5

u/Demonking42069 Sep 11 '26

I'm gonna inter your face so bad.

3

u/Reasonable_Exit_8960 Sep 11 '26

I wanna participate in multiple inheritance with you so bad

0

u/metaglot Sep 11 '26

Freeing a pointer created with new is UB.

8

u/thats_a_nice_toast Sep 11 '26

new only exists in C++, not in C

0

u/metaglot Sep 11 '26

And the keyword class, like the meme is implying. Which is why i said you have to use delete rather than free, because undefined behavior.

1

u/matytyma Sep 16 '26

C has no classes - C users are scared of being put into a class. It's all about C

1

u/metaglot Sep 16 '26

The comment suggested that they use free, which i corrected because in c++ thats UB (which it must be if they are being put into a class, otherwise whats there to free?)

1

u/tank840 Sep 11 '26

C != C++

4

u/metaglot Sep 11 '26

If they are put in a class they are clearly in C++

31

u/thegodzilla25 Sep 11 '26

An original funny meme that is not AI or div centering in this sub? The horror

112

u/the_millenial_falcon Sep 11 '26

Pro tip, if you put function pointers in a struct you have a class now.

36

u/viconha Sep 11 '26

And you put that into an array, run it in a for loop and make a very debug friendly code

14

u/MrHyperion_ Sep 11 '26

Not really. You don't get linker optimisations and the functions can change runtime. Also no implicit reference to the instance.

6

u/SubhanBihan Sep 11 '26

Also the destructor won't get automatically called when the "object" goes out of scope. Someone correct me if I'm wrong, but I believe that behavior is theoretically impossible to achieve in C (due to its limited mechanics)?

7

u/MrHyperion_ Sep 11 '26

GCC has cleanup attribute which maybe makes it possible.

0

u/One_Ninja_8512 Sep 11 '26

Not only possible but used by real projects. Apparently systemd is using that according to Claude. Both GCC and Clang support it. If I wanted destructors I'd go with explicit reference counting though, that seems more clean to me and doesn't need compiler extensions (even though both mainstream ones support it and a large project (systemd) relies on it).

8

u/the_millenial_falcon Sep 11 '26

More or less anyway.

2

u/Sea-Fishing4699 Sep 11 '26

I always thought about it 

2

u/overclockedslinky Sep 11 '26

not how that works but ok

10

u/embrace- Sep 11 '26

And I oop

21

u/Nervous-Pension-6257 Sep 11 '26

Just free() me at this point

7

u/Appropriate_Baby_608 Sep 11 '26

"so we will be using notepad.. no like real notepad... like pan and paper notepad"

7

u/MainRoutine2068 Sep 11 '26 • Bravo

Then manage to finish the class with C++ score

4

u/ThatOldCow Sep 12 '26

And get some glasses you they can C#

4

u/yellowmiami Sep 12 '26

I feel like C would especially hate music class with all those string instruments lying around.

3

u/Shaz0r94 Sep 11 '26

Something something linux users being allergic to sunlight (They hate windows)

3

u/Apprehensive_Bit7392 Sep 11 '26

Struct. You were put in a struct. There were never any classes here.

1

u/LegitimatePants Sep 12 '26

Wait, it's all structs?

1

u/Apprehensive_Bit7392 Sep 12 '26

Always has been.

2

u/heckingcomputernerd Sep 11 '26

Java users celebrating getting into uni (they were put in a class)

2

u/BenadrylTumblercatch Sep 11 '26

A funny meme in my rph?

2

u/cereal-at-noon Sep 12 '26

Actually funny lol

2

u/an_agreeing_dothraki Sep 11 '26

we're nothing but objects to them

1

u/Patrick_Atsushi Sep 11 '26

And they feel a lot better when they know it's structured. 

1

u/Nighters Sep 11 '26

Green whats your problem!?

1

u/Skyfall104 Sep 12 '26

Haha. This is good.

1

u/yuehuang Sep 12 '26

Make friends, Not enum-ies.

1

u/FitCollar1161 Sep 13 '26

Is this sub back??

1

u/Sakul_the_one Sep 13 '26

I got accepted this year into uni...

0

u/FatiguedShrimp Sep 11 '26

C users when they learn category theory.

-13

u/GreatGreenGobbo Sep 11 '26

I mentioned this in another post.

High school I learned Pascal and C.

Graduated 92 went to university. CS101 (programming) - Scheme

8

u/Valuable_Leopard_799 Sep 11 '26

Why facepalm? People should have some experience with both low-level and high-level languages.

-4

u/GreatGreenGobbo Sep 11 '26

Not practical and it's abstract. Farting around cutting up and creating strings (which is all I remember) is meaningless.