On Mon, 29 Mar 2004, Theo Schlossnagle wrote:
On Mar 29, 2004, at 3:42 AM, Shevek wrote:
Not only is it less readable for the user, but it is harder
(impossible?)
to parse using simple regular expressions. While not a requirement,
most
simple mail filtering programs are regular-expression based. Therefore
the
current encoding has a slight advantage.
That's assuming you are using a scripting language. It's actually more
work to use regexps in a compiled language than that propsed
netstrings-like encoding. size+data is much easier and faster to parse
in languages that don't support native regular expressions. Also I'd
think that while it takes an extra line of code in a language like
perl, it would still be faster.
I agree with you. However:
1) The netstrings-like encoding is longer in most cases since many lengths
are >10.
2) We _still_ can't arbitrarily reorder fields unless we also label them
with keys (Do we really want to serialise a hash into the local-part?)
3) most existing mail handling/filtering programs are scripted or already
have support for regexes.
4) Human readability is important.
S.
--
Shevek http://www.anarres.org/
I am the Borg. http://www.gothnicity.org/