[swift-server-dev] [HTTP] Value vs Reference Types

Rob Allen rob at akrabat.com
Thu Nov 24 02:52:54 CST 2016


> On 23 Nov 2016, at 23:29, Helge Heß via swift-server-dev <swift-server-dev at swift.org> wrote:
> 
> On 24 Nov 2016, at 00:09, Dan Appel <dan.appel00 at gmail.com> wrote:
> 
>> Copying the message around will keep a reference to the same stream, but since its immutable this isn't an issue.
> 
> Elaborate. If a stream is attached the immutability property of the message is essentially void and rendered pretty much useless? (as you can’t pass it around anymore as-if-new, that only makes sense if the body too is part of the immutability contract).

I've worked on systems in other languages where the message object is immutable, but the body is reference to a stream. This is a very confusing scenario and I'm not a fan.

Regards,

Rob...


More information about the swift-server-dev mailing list