[cad-linux] textual formats

  • From: Eric Wilhelm <ewilhelm@xxxxxxxxxxxxx>
  • To: cad-linux@xxxxxxxxxxxxx
  • Date: Sat, 13 Sep 2003 00:25:36 -0500

http://www.catb.org/~esr/writings/taoup/html/ch05s01.html

(this is a huge, but good book (guess I should have realized earlier that it 
is by Eric S. Raymond))

This has some good points about text-vs-binary in the "Case Study: Unix 
Password File Format" section.

One thing to note is the escaping of the delimiter with a backslash.

When every read or write action requires you to consider whether a character 
needs to be escaped or not, you are likely in a large body of code to use 
functions to handle this (both in parsing and writing.)  If a small ad-hoc 
program gets broken by forgetting the escape issue, wouldn't it be better to 
use a library to parse the data even then?
(such as use Module; $a = Module::read($stuff);)

If this is the case, do you care what the format is, provided that the module 
allows you to simply access it?  I'm not saying that we shouldn't use textual 
formats, but I think with geometric data, that the key is to always use 
functions with predictable behavior built into them rather than handling the 
data as raw (be it text or binary.)

--Eric

Other related posts:

  • » [cad-linux] textual formats