Re: [Q] Text vs Binary Files
From: Eric (egusenet_at_verizon.net)
Date: 05/27/04
- Next message: DEMAINE Benoit-Pierre: "Re: raw access and disabling buffers"
- Previous message: Arthur J. O'Dwyer: "Re: Prescott, was re: security coding guidelines for C/C++"
- In reply to: Arthur J. O'Dwyer: "Re: [Q] Text vs Binary Files"
- Next in thread: Arthur J. O'Dwyer: "Re: [Q] Text vs Binary Files"
- Reply: Arthur J. O'Dwyer: "Re: [Q] Text vs Binary Files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 27 May 2004 10:40:10 -0400
Arthur J. O'Dwyer <ajo@nospam.andrew.cmu.edu> wrote:
> On Thu, 27 May 2004, Eric wrote:
> >
> > Arthur J. O'Dwyer <ajo@nospam.andrew.cmu.edu> wrote:
> > [Eric wrote]
> > > > -- should transportation to another OS become useful or needed,
> > > > the text files would be far easier to work with
> > >
> > > I would guess this is wrong, in general. Think of the difference
> > > between a DOS/Win32 text file, a MacOS text file, and a *nix text
> > > file (hint: linefeeds and carriage returns).
> >
> > Which is why I mentioned at the end using a solid XML parser to deal
> > with such issues transparently. I likely wouldn't consider using a text
> > file if something like XML and solid parsers weren't available and free.
>
> Ah, but what do you do when the XML standard changes? :)
Please correct me if I am wrong, but the design of XML already takes
this into account. In otherwords, the idea that it can and will change
is a part of the design - this is one reason why XML is such a nifty
technology.
> Misunderstood. By "the same systems," I meant the systems I just
> mentioned: DOS/Win32, Unix, and MacOS. Their binary data formats are
> identical.
What do you mean by 'their binary data formats are identical'?...this
would seem to imply that big/little endian issues are a thing of the
past...?
> > > > -- tolerant of basic data type size changes (enumerated types have
> > > > been known to change in size from one version of a compiler to
> > > > the next)
> > >
> > > It's about five minutes' work to write portable binary I/O functions
> > > in most languages
> >
> > Ah, but it's five minutes I don't want to spend,
>
> Versus five minutes trying to make your free XML parser compile?
Binaries of the better parsers are available, so this is a non-issue.
:-)
> > Plus, the potental for spending time attempting to figure out why the
> > @#$%@$ isn't being read properly isn't accounted for here.
>
> Of course not. I/O is trivial.
Once you track down the problem...however, it would not be uncommon to
think the problem lies elsewhere first and spend hours before finding
the trivial fix.
> It's your *algorithms* that are
> going to be broken; and they'd be broken no matter what output format
> you used.
With XML, the risk of this is far less, as long as you're not changing
the tag names or what they mean, if it really exists at all.
- Next message: DEMAINE Benoit-Pierre: "Re: raw access and disabling buffers"
- Previous message: Arthur J. O'Dwyer: "Re: Prescott, was re: security coding guidelines for C/C++"
- In reply to: Arthur J. O'Dwyer: "Re: [Q] Text vs Binary Files"
- Next in thread: Arthur J. O'Dwyer: "Re: [Q] Text vs Binary Files"
- Reply: Arthur J. O'Dwyer: "Re: [Q] Text vs Binary Files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|