Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
jeffbee
on May 22, 2024
|
parent
|
context
|
favorite
| on:
Orthodox C++
Are you suggesting
printf("%.*s", static_cast<int>(sv.size()), sv.data()) ?
humanrebar
on May 22, 2024
[–]
Well, wrap it up in something more ergonomic, but it works. I'm usually putting strings into some sort of I/O API (like a logger) instead of hardcoding copies to stdout everywhere.
https://stackoverflow.com/a/72575650
jeffbee
on May 22, 2024
|
parent
[–]
Wrap it
way
up into something ergonomic and idiomatic, like fmt.
humanrebar
on May 23, 2024
|
root
|
parent
[–]
Sure. I do. But there are tradeoffs even then. Look at the error messages compared to printf for example.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: