230
True Story (lemmy.world)
you are viewing a single comment's thread
view the rest of the comments
[-] Lauchmelder@feddit.de 41 points 2 years ago* (last edited 2 years ago)

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

[-] merthyr1831@lemmy.world 44 points 2 years ago

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.

[-] Lauchmelder@feddit.de 6 points 2 years ago

not saying it's good design, I ditched C++ long ago. at least the C++20 modules API is gonna fix this, right guys?

load more comments (6 replies)
load more comments (16 replies)
this post was submitted on 22 Mar 2024
230 points (94.2% liked)

Programmer Humor

39203 readers
112 users here now

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

Rules:

founded 6 years ago
MODERATORS