On Sun, Nov 24, 2013 at 11:50 AM, Tim Peierls <[email protected]> wrote:
> My point was that there are reasons to prefer final fields beyond the > desire for immutability (which, as you correctly pointed out, final fields > alone don't guarantee). Understood, and my point was that these reasons are overstated. Let's be concrete: can you write a program that gets initialized correctly with constructor injection and incorrectly with field injection? I've tried to come up with one with various techniques (misusing volatile, synchronized, the doubly locked idiom, etc...) but I've never been able to come up with one. My gut feeling right now is that it can't be done on X86. Happy and excited to be proven wrong. -- Cédric -- You received this message because you are subscribed to the Google Groups "google-guice" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-guice. For more options, visit https://groups.google.com/groups/opt_out.
