[Y-devel] Proposal for a minor change in the Y-protocol

Richard Hills richard.hills at balliol.ox.ac.uk
Sun Apr 11 20:24:45 BST 2004


Hey,
> > In the comments in the libYc is written thet the '\0' may be not used in
> > the future. I go for it. The '\0' is not needed. You should depend to
> > "member length" field find how big the string is. And null terminated
> > strings are a bad idea anyway. A very nice article about this topic is the
> > following: https://www.joelonsoftware.com/articles/fog0000000319.html

        As far as I understand the \0 isn't needed, but when I was writing that
part of libYc it was easier at the time to just include it. Neither the
server nor libYc clients rely on it.

> 4-bytes aligend addresses. There are to reason I do not like it:
> 1) It is ugly :-)
> 2) Most modern  RISC processors do not work very happily with
not-aligned
> values. We should try to make serialization - deserialization as fast
as
> possible

        I don't really think it's that ugly. And although we want
deserialization to go fast, I don't think this will have a significant
effect on speed. If you can point out a protocol which does align
everything to the nearest 4 bytes for this reason I'd be interested to
see it.

Richard Hills




More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved