[rabbitmq-discuss] rabbit_binary_parser:ensure_content_decoded/2 - why /2 rather than /1?

Matthias Radestock matthias at rabbitmq.com
Sat Aug 7 21:26:28 BST 2010


Tony Garnock-Jones wrote:
> Looks like ensure_content_encoded could also be /1

No! That would prevent any transcoding between different protocol 
versions. While the higher-level APIs currently do not support that 
(since it is not needed), the lower ones certainly do.

> Also it doesn't seem to be called anywhere!

It is there for symmetry.

> (And also it's a bit weird. The pattern-matching in the heads doesn't
> look exhaustive.)

It *is* exhaustive.


More information about the rabbitmq-discuss mailing list