On approximately 4/10/2009 9:56 AM, came the following characters from the keyboard of Barry Warsaw:
On Apr 10, 2009, at 1:19 AM, email@example.com wrote:
On 02:38 am, firstname.lastname@example.org wrote:
So, what I'm really asking is this. Let's say you agree that there are use cases for accessing a header value as either the raw encoded bytes or the decoded unicode. What should this return:
The raw bytes or the decoded unicode?
My personal preference would be to just get deprecate this API, and get rid of it, replacing it with a slightly more explicit one.
This is pretty darn clever Glyph. Stop that! :)
I'm not 100% sure I like the name .bytes_headers or that .headers should be the decoded header (rather than have .headers return the bytes thingie and say .decoded_headers return the decoded thingies), but I do like the general approach.
If one name has to be longer than the other, it should be the bytes version. Real user code is more likely to want to use the text version, and hopefully there will be more of that type of code than implementations using bytes.
Of course, one could use message.header and message.bythdr and they'd be the same length.
A protocol is complete when there is nothing left to remove. -- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking