-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>
> OK, we found a protocol that behaves as you describe, and one that's
> not overly complex. So, what is Opossum used for, and how does it
> take advantage of this typing? Finally, if we wanted to add a weak
> type for "Date", could this also be encoded, or would it just have to
> be passed along as a string like most unknown fields?
I'm not proposing that we use Opossum specifically,, that was just an
example of a spec that maintains complete readability without sacrificing
typing. Opossum *works* because there's something recognizable in the
stream data that separates one type from another. All digits in
integers, The '.' + all digits in floats, the 0x in hex. Date could
probably be included, perhaps by noticing all digits plus the occurences
of '-' or ':'.
Oppossum is a compromise, it eliminates the need for explicit typing
constructs (type names, characters, etc) for readability, but it looses a
bit of flexibility in doing so.
I think what Oskar and I had in mind is that there would be very few
actual types, String, integer, float, boolean, maybe one or two more.
Let me go ahead and complicat matters by showing you Opossum's list and
dictionary structure:
Dictionary:
{key=value, key=value, ... key=value} (where key and value are both any
other Opossum type.
List:
[value, value, ... value]
So one could (though I don't know if one should, as its a bit ugly}, do:
PublishedOn={date=[2000,05,03,12,00,32]}
Besides, I personally think things like data ought to be represented as
long quantites such as seconds since the epoch, which facilitate very easy
comparison and fits into a base type.
Scott
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE5IEZTpXyM95IyRhURAvjpAJ9yJ4r3+ItzsbFv96BV9DezOXGJCACgr+Xo
ogmisulJGkd8+fwCOTlWPsM=
=V+Qq
-----END PGP SIGNATURE-----
_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev