3 ms·
One of the strengths of C++ is the ability to build features like this as a library, and not hardcode it into the language design. Unless you specifically want
by fooker 1y ago
One of the strengths of C++ is the ability to build features like this as a library, and not hardcode it into the language design.
Unless you specifically want the ‘?’ operator, you can get pretty close to this with some clever use of templates and operator overloading.
If universal function call syntax becomes standardized, this will look even more functional and elegant.
- steveklabnik 1y agoRust also started with it as a library, as try!, before ?. There were reasons why it was worth making syntax, after years of experience with it as a macro.