> In that case, maybe it would be better just to take another byte for a type
> indicator.  For example, S = string, N = number, B = boolean.  Then we
> wouldn't have to perform escaping and it would be more flexible if we
> eventually wanted to add new types.  e.g.
> 
> Field1=Ssomestring
> Field2=N3a372f83
> Field3=Btrue

Ick and double ick.  The data type and interpretation of field
values is already 100% completely specified by NAME.  If you don't
already know the type of a field by its name, you shouldn't be
reading it.  This just generates another source of errors: now I
have to write code that not only grabs a field by name, but now I
have to check whether the type matches what I expect.

If you think you need data types so that a code layer interposed
between the code that reads the message and the code that uses
the fields can do conversions, that's just a layer of code that
doesn't need to be there. 

--
Lee Daniel Crocker <lee at piclab.com> <http://www.piclab.com/lee/>
"All inventions or works of authorship original to me, herein and past,
are placed irrevocably in the public domain, and may be used or modified
for any purpose, without permission, attribution, or notification."--LDC


_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to