▲ 839 ▼ Omnilingualism (lemmy.world) submitted 3 years ago by raker@lemmy.world to c/programmerhumor@lemmy.ml 42 comments fedilink hide all child comments
[–] Hephoh2@feddit.de 26 points 3 years ago (5 children) The C++ one doesn't make sense permalink fedilink source hideshow 5 child comments replies: [–] JakenVeina@lemm.ee 22 points 3 years ago (4 children) I think templates is what he's making fun of. permalink fedilink source parent hideshow 4 child comments replies: [–] Valmond@lemmy.world 6 points 3 years ago (3 children) How so, templates make for less code usually? Or like template meta prog? I'm a C++ dev and I'm lost on this one :-p plz send help permalink fedilink source parent hideshow 3 child comments replies: [–] Phrodo_00@kbin.social 3 points 3 years ago (1 child) I think it's because each template specialization works kind of like a new copy of a class. permalink fedilink source parent hideshow 1 child comment replies: [–] Valmond@lemmy.world 1 point 3 years ago Still not getting it, I mean you don't even get to see the code? IDK permalink fedilink source parent [–] JakenVeina@lemm.ee 1 point 3 years ago /shrug That's my best guess, in the sense that that's what the compiler ends up producing, for templated code: the same code copy-pasted for however many different use cases you have. permalink fedilink source parent
[–] JakenVeina@lemm.ee 22 points 3 years ago (4 children) I think templates is what he's making fun of. permalink fedilink source parent hideshow 4 child comments replies: [–] Valmond@lemmy.world 6 points 3 years ago (3 children) How so, templates make for less code usually? Or like template meta prog? I'm a C++ dev and I'm lost on this one :-p plz send help permalink fedilink source parent hideshow 3 child comments replies: [–] Phrodo_00@kbin.social 3 points 3 years ago (1 child) I think it's because each template specialization works kind of like a new copy of a class. permalink fedilink source parent hideshow 1 child comment replies: [–] Valmond@lemmy.world 1 point 3 years ago Still not getting it, I mean you don't even get to see the code? IDK permalink fedilink source parent [–] JakenVeina@lemm.ee 1 point 3 years ago /shrug That's my best guess, in the sense that that's what the compiler ends up producing, for templated code: the same code copy-pasted for however many different use cases you have. permalink fedilink source parent
[–] Valmond@lemmy.world 6 points 3 years ago (3 children) How so, templates make for less code usually? Or like template meta prog? I'm a C++ dev and I'm lost on this one :-p plz send help permalink fedilink source parent hideshow 3 child comments replies: [–] Phrodo_00@kbin.social 3 points 3 years ago (1 child) I think it's because each template specialization works kind of like a new copy of a class. permalink fedilink source parent hideshow 1 child comment replies: [–] Valmond@lemmy.world 1 point 3 years ago Still not getting it, I mean you don't even get to see the code? IDK permalink fedilink source parent [–] JakenVeina@lemm.ee 1 point 3 years ago /shrug That's my best guess, in the sense that that's what the compiler ends up producing, for templated code: the same code copy-pasted for however many different use cases you have. permalink fedilink source parent
[–] Phrodo_00@kbin.social 3 points 3 years ago (1 child) I think it's because each template specialization works kind of like a new copy of a class. permalink fedilink source parent hideshow 1 child comment replies: [–] Valmond@lemmy.world 1 point 3 years ago Still not getting it, I mean you don't even get to see the code? IDK permalink fedilink source parent
[–] Valmond@lemmy.world 1 point 3 years ago Still not getting it, I mean you don't even get to see the code? IDK permalink fedilink source parent
[–] JakenVeina@lemm.ee 1 point 3 years ago /shrug That's my best guess, in the sense that that's what the compiler ends up producing, for templated code: the same code copy-pasted for however many different use cases you have. permalink fedilink source parent