@FreeBuilder
interface Team { ... }
@FreeBuilder
interface Game {
Team away();
Team home();
}--
You received this message because you are subscribed to the Google Groups "FreeBuilder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to freebuilder...@googlegroups.com.
To post to this group, send email to freeb...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/freebuilder/62bd004d-8204-4e91-83fc-bb8d61ae67df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No, there is no reason other than that the feature is not yet implemented. (I mean, technically there's nothing stopping people making mutable FreeBuilder types, but I think it's still a sensible optimization.) Raised https://github.com/google/FreeBuilder/issues/270 to track. Thanks!Alice
On Fri, 22 Dec 2017 at 15:01 <o...@fleaflicker.com> wrote:
I may have overlooked it but it there doesn't appear to be a way to set a buildable property by reference -- it's always copied either via merge or buildPartial and merge (MergeBuilderMethod).--Is there a reason setting by reference isn't supported? FreeBuilder types are immutable.Small example:@FreeBuilder
interface Team { ... }
@FreeBuilder
interface Game {
Team away();
Team home();
}The builder for Game will copy each Team reference that is set even though the Team is an immutable value type. So a collection of games ends up with many copies of the same Team objects.Thanks!
You received this message because you are subscribed to the Google Groups "FreeBuilder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to freebuilder+unsubscribe@googlegroups.com.
Apologies for the lack of visible progress on this, Ori. I've actually implemented the feature but a lack of people willing to do code reviews on FreeBuilder is blocking all progress on the project at the moment.
Alice
On Wednesday, 27 December 2017 00:34:58 UTC, Alice Purcell wrote:
No, there is no reason other than that the feature is not yet implemented. (I mean, technically there's nothing stopping people making mutable FreeBuilder types, but I think it's still a sensible optimization.) Raised https://github.com/google/FreeBuilder/issues/270 to track. Thanks!Alice
On Fri, 22 Dec 2017 at 15:01 <o...@fleaflicker.com> wrote:
I may have overlooked it but it there doesn't appear to be a way to set a buildable property by reference -- it's always copied either via merge or buildPartial and merge (MergeBuilderMethod).--Is there a reason setting by reference isn't supported? FreeBuilder types are immutable.Small example:@FreeBuilder
interface Team { ... }
@FreeBuilder
interface Game {
Team away();
Team home();
}The builder for Game will copy each Team reference that is set even though the Team is an immutable value type. So a collection of games ends up with many copies of the same Team objects.Thanks!
You received this message because you are subscribed to the Google Groups "FreeBuilder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to freebuilder...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/freebuilder/245e8ebe-638e-4850-a6d4-6a8447c7ab56%40googlegroups.com.