Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think this is one scenario where C++ type-templated string formatters could shine.

Especially if you extended them to indicate assumptions about the values at compile time. E.g., possible ranges for integers, whether or not a floating point value can have certain special values, etc.



You’d be surprised. I’m pretty sure std::format is templated. That doesn’t mean that it’s still easy to convince the compiler to delete that code.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: