MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programmingmemes/comments/1xzg8so/c_vs_python/19su5uoycs3c4/
r/programmingmemes • u/ExpensiveCoat8912 • 6d ago
37 comments sorted by
View all comments
Show parent comment
9
well that's not a very fair comparison now is it
8 u/SpaceCadet87 6d ago #include <cake> int main() { Cake myCake("Chocolate", 3, true); myCake.serve(); return 0; } 1 u/Total-Box-5169 5d ago #include <cake> int main() { Cake{"Chocolate", 3, true}.serve(); } 2 u/SpaceCadet87 5d ago Oh, I didn't realise we were doing code golf.M{Cake{"Chocolate",3,1}.serve();} g++ -D'M=int main()' -include cake x.cpp 1 u/DatsLotus 4d ago Damn, you've bested me. I could only follow up until the previous one. 2 u/SpaceCadet87 4d ago Ah, basically I told the compiler to do a find and replace so that instead of int main() you just type M and you can do an include at the command line so we throw that line out as well.The rest can all fit on a single line. 1 u/DatsLotus 4d ago The more I learn, the more I discover I have more to learn.
8
#include <cake> int main() { Cake myCake("Chocolate", 3, true); myCake.serve(); return 0; }
1 u/Total-Box-5169 5d ago #include <cake> int main() { Cake{"Chocolate", 3, true}.serve(); } 2 u/SpaceCadet87 5d ago Oh, I didn't realise we were doing code golf.M{Cake{"Chocolate",3,1}.serve();} g++ -D'M=int main()' -include cake x.cpp 1 u/DatsLotus 4d ago Damn, you've bested me. I could only follow up until the previous one. 2 u/SpaceCadet87 4d ago Ah, basically I told the compiler to do a find and replace so that instead of int main() you just type M and you can do an include at the command line so we throw that line out as well.The rest can all fit on a single line. 1 u/DatsLotus 4d ago The more I learn, the more I discover I have more to learn.
1
#include <cake> int main() { Cake{"Chocolate", 3, true}.serve(); }
2 u/SpaceCadet87 5d ago Oh, I didn't realise we were doing code golf.M{Cake{"Chocolate",3,1}.serve();} g++ -D'M=int main()' -include cake x.cpp 1 u/DatsLotus 4d ago Damn, you've bested me. I could only follow up until the previous one. 2 u/SpaceCadet87 4d ago Ah, basically I told the compiler to do a find and replace so that instead of int main() you just type M and you can do an include at the command line so we throw that line out as well.The rest can all fit on a single line. 1 u/DatsLotus 4d ago The more I learn, the more I discover I have more to learn.
2
Oh, I didn't realise we were doing code golf.
M{Cake{"Chocolate",3,1}.serve();}
g++ -D'M=int main()' -include cake x.cpp
1 u/DatsLotus 4d ago Damn, you've bested me. I could only follow up until the previous one. 2 u/SpaceCadet87 4d ago Ah, basically I told the compiler to do a find and replace so that instead of int main() you just type M and you can do an include at the command line so we throw that line out as well.The rest can all fit on a single line. 1 u/DatsLotus 4d ago The more I learn, the more I discover I have more to learn.
Damn, you've bested me. I could only follow up until the previous one.
2 u/SpaceCadet87 4d ago Ah, basically I told the compiler to do a find and replace so that instead of int main() you just type M and you can do an include at the command line so we throw that line out as well.The rest can all fit on a single line. 1 u/DatsLotus 4d ago The more I learn, the more I discover I have more to learn.
Ah, basically I told the compiler to do a find and replace so that instead of int main() you just type M and you can do an include at the command line so we throw that line out as well.
int main()
M
The rest can all fit on a single line.
1 u/DatsLotus 4d ago The more I learn, the more I discover I have more to learn.
The more I learn, the more I discover I have more to learn.
View all comments
Show parent comment
9
u/GamingGo2022 6d ago
well that's not a very fair comparison now is it