this post was submitted on 22 Mar 2024
2 points (100.0% liked)

Programmer Humor

31224 readers
51 users here now

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

Rules:

founded 4 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 0 points 3 months ago* (last edited 3 months ago) (4 children)

Why are you putting the implementation in the .h file? You're supposed to declare in the header and implement in the .cpp files. The meme is reversed

[–] [email protected] 0 points 3 months ago (3 children)

If C++/C were real languages for real programming they'd enforce this in the compiler.

No sane language designer would say "it is imperative that you do not implement your class in its header file" then write a compiler designer to say "oh you implemented your code in the header file? lol lmao that rocks"

They have played you all for fools.

[–] [email protected] 0 points 3 months ago (2 children)

I actually like how much freedom C++ gives you. As long as it is fed valid code, it does not give a fuck about how you choose to structure your project

[–] [email protected] 0 points 3 months ago (1 children)

That freedom becomes misery on the instant you have to start maintain the code from some other free spirit, whose style is totally different from yours.

[–] [email protected] 2 points 2 months ago

Or the free spirit was actually you yourself but from three months ago