Remix.run Logo
jstimpfle 3 hours ago

The hidden compile-time cost of <insert almost any C++ feature>

SuperV1234 2 hours ago | parent [-]

Nah, many great features are extremely cheap. E.g. constexpr, templates, fold expressions, equality operator defaulting, concepts...

JamesTRexx an hour ago | parent | next [-]

Until you try to add / modify a feature of the software and run into confusing template or operator or other C++ specific errors and need to deconstruct a larger part of the code to find (if possible) out where it comes from and spend even more time trying to correct it.

C++ is the opposite of simplicity and clarity in code.

kreco 2 hours ago | parent | prev | next [-]

Yes, but they are still all hidden.

direwolf20 an hour ago | parent | prev [-]

constexpr means running code at compile time. template means duplicating lots of code lots of times. these are not cheap.

jeffbee 32 minutes ago | parent [-]

Yeah this is the very first time I am hearing that templates are "extremely cheap". Template instantiation is pretty much where my project spends all of its compilation time.