[RFC] Immutable request building.

33 views
Skip to first unread message

Adam Shannon

unread,
Feb 13, 2013, 12:51:49 AM2/13/13
to Dispatch Scala
Hey all,

I've started working a bit on an immutable request building layer for
reboot, what do you all think?

https://github.com/adamdecaf/reboot/tree/immutable-requests/core/src/main/scala/immutable

--
Adam Shannon
Developer
University of Northern Iowa
Junior -- Computer Science & Mathematics
http://ashannon.us

n8han

unread,
Feb 17, 2013, 10:56:38 AM2/17/13
to dispatc...@googlegroups.com
Hi Adam, this looks like a good direction to move in! Originally I wanted to stick to the underlying `RequestBuilder` type for simplicity. But it seems like making the underlying type immutable in Java will be harder than wrapping it in Scala and providing two-way conversions, as I think you're doing here. This is also of course how Dispatch Classic does things.

Nathan

Jack Viers

unread,
Mar 1, 2013, 1:50:44 PM3/1/13
to dispatc...@googlegroups.com
I can concur that immutable RequestBuilders are a nice-to-have. Got tripped up on that a lot when I started using dispatch, especially when testing against unfiltered. I defer to the BDFL, but pending some independent testing and code review by n8han, I'd like to see this get added.

Jack Viers

unread,
Mar 1, 2013, 1:52:38 PM3/1/13
to dispatc...@googlegroups.com
Also, it would help if there were additions to the docs on this, before it gets added.


On Sunday, February 17, 2013 9:56:38 AM UTC-6, n8han wrote:
Reply all
Reply to author
Forward
0 new messages