Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Icon > Re: Handling de...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 102 of 196
Post > Topic >>

Re: Handling delimited strings

by mwojcik@[EMAIL PROTECTED] (Michael Wojcik) Nov 1, 2005 at 05:35 PM

[Followups restricted to comp.programming.]

In article <20051031100540.3a7c3281.steveo@[EMAIL PROTECTED]
>, Steve O'Hara-Smith
<steveo@[EMAIL PROTECTED]
> writes:
> 
> 	The essence of what I was thinking about was nested TLV
> structures which always seemed to me to be more robust than the
> paired delimiters of XML.

What would make TLV (by which I assume you mean type-length-value
vectors, presumably with binary, fixed-length encodings for type and
length) more robust than XML?  It has less redundancy, and therefore
less capacity for error detection and correction.

A trivial example: say type is a single octet, and all 256 type codes
are defined.  Then it is impossible to detect if a type value is
wrong (for whatever reason - program error, transmission error, etc),
without additional context.

XML makes many tradeoffs, and there are certainly applications where
a TLV encoding of some sort is preferable due to various plausible
constraints.  But TLV is not "more robust" than XML in general.

That said, I agree that nested TLV structures looks like a better
choice for representing arbitrary structure data than the OP's
proposal of in-band signalling with special flag bytes.  That means
restricting the domain of ordinary data values, which means some
kind of ****ft-encoding of values that are outside that doman, and
that's invariably a mess, error-prone, difficult to enhance while
maintaining backward compatibility, and inefficient.

-- 
Michael Wojcik                  michael.wojcik@[EMAIL PROTECTED]
 as a software professional, tradition requires me to spend
New
Years Eve drinking alone, playing video games and sobbing uncontrollably.
  -- Peter Johnson
 




 2 Posts in Topic:
Re: Handling delimited strings
Steve O'Hara-Smith <st  2005-10-31 10:05:40 
Re: Handling delimited strings
mwojcik@[EMAIL PROTECTED]  2005-11-01 17:35:12 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 12:53:55 CDT 2008.