[AFS3-std] Re: Encoding IPvN addresses

Jeffrey Hutzelman jhutz@cmu.edu
Thu, 10 Feb 2011 17:40:47 -0500


--On Thursday, February 10, 2011 03:29:04 PM -0600 Andrew Deason 
<adeason@sinenomine.net> wrote:

> Doing something like this allows for space-optimization in what is the
> most common case for us

Premature optimization is the root of all evil.
Are you sure that the savings of a few bytes in, say, 
VL_GetAddrsNewAndShiny is worth the extra complexity?

>> How about a new type of union that always sends the length of the
>> encoded data?
>
> This would make things easier in many other situations as well, so I'm
> all for it. Would that mean we're diverging from regular XDR, though?

It would, but then, that's not new.  I proposed a new _primitive_ type 
several days ago, though someone (you?) has since described a way to do 
what we were talking about in terms of an opaque<>.

> (Does it matter?)

No, I don't think it does.  AFS already has a primitive UUID type not 
included in other XDR variants.

-- Jeff