▲ | summerlight 5 days ago | |||||||||||||||||||||||||
> in C++, you can write perfectly fine code without ever needing to worry about the more complex features of the language. You can write simple, readable, and maintainable code in C++ without ever needing to use templates, operator overloading, or any of the other more advanced features of the language. Only if you have full control on what others are writing. In reality, you're going to read a lot, lots of "clever" codes. And I'm saying as a person who have written a good amount of template meta programming codes. Even for me, some codes take hours to understand and I was usually able to cut 90% of its code after that. | ||||||||||||||||||||||||||
▲ | zzrrt 5 days ago | parent | next [-] | |||||||||||||||||||||||||
I’m probably guilty of gratuitous template stuff, because it adds fun to the otherwise boring code I spend a lot of time on. But I feel like the 90% cutdowns are when someone used copy-paste instead of templates, overloads, and inheritance. I don’t think both problems happen at the same time, though, or maybe I misunderstood. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | jjaksic 5 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
Being able to cut 90% of code sounds like someone was getting paid by LoC (which is also a practice from a time when C++ was considered a "modern" language). | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | paulddraper 5 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
“If someone can, they will.” Some lvalue move copy constructor double rainbow, and you’re left wondering wtf | ||||||||||||||||||||||||||
▲ | worik 5 days ago | parent | prev [-] | |||||||||||||||||||||||||
> make it look as much like C as you possibly can, and avoid using too many advanced features of the language unless you really need to. Oh boy! This person needs control. That is where I left C++, a better C Faint praise |