J
James Kanze
I mostly agree, but there are exceptions, and they are not
THAT few. One apparant exception is databases: if you want
high performance and reliability, there is no way out of
writing data explicitly to disk and doing so in a binary
format.
Nobody said to not use a binary format. But a binary format is
not "unformatted". All of the high performance data bases I
know use a proprietary internal format, with little impact on
performance.
Of course, portability suffers but you don't want to port to
exoteric machines anyway.
You might, however, want to be able to reread the data with a
program compiled with a newer version of the compiler. Or with
a program compiled with different compiler options. I've seen
byte order change from one version of the compiler to the next
(Microsoft, for PC's---not the most exoteric machine around),
and all of the compilers I use have options which change the
size of some of the basic types, padding in structures, etc.