r/cpp • u/aearphen {fmt} • Jul 20 '26
Żmij 1.1 released with fixed notation support, up to 38% faster double-to-string conversion, SIMD-optimized float formatting, a smaller binary footprint and more
41
Upvotes
View all comments
Show parent comment
4
u/ack_error Jul 21 '26
The advantage of a text format like .obj is that it's stupidly simple. I can write an .obj file from almost anywhere using simple text I/O commands, and the result can be diffed/merged, searched with grep, and viewed/edited in any standard text editor.
Would I base an entire full-size game on .obj? No. But I'd rather use a text-based model format like USD than an undocumented binary format like FBX that is practically unusable without linking in a huge library. And while you wouldn't ordinarily want to edit them directly as text, it's easier to figure out what blew up the loader when you can look at the text file and find that some tool wrote NaN where there was supposed to be a vertex coordinate.
If there were good, standard, generic binary formats then this wouldn't be an issue, but there aren't. The main ubiquitous structured data formats are all text -- simple line oriented, XML, JSON, etc. There have been many attempts at general binary formats, but they either don't get enough traction or make people shiver in terror when mentioned (ASN.1). Bespoke binary formats for specific purposes tend to have poor tooling support or just plain bad design, even simple things like not having an identifiable format header.