Well, Dick was making the case of the functional programming style, where immutable objects are the way to go. So a class should definitely not evolve to a mutable version...
On Nov 21, 1:40 am, Christian Catchpole <[email protected]> wrote: > I don't know specifically what dick was talking about, but my concerns > are: > > - does this give you dual methodologies for field access? members vs > getters > > - a reference may be final (maybe immutable) now, but what do you do > if your class evolves to where the reference is now mutable? > > - even though a field is final can the caller still modify the > object? I guess you can argue the same for any getter though. > > On Nov 21, 10:02 am, Moandji Ezana <[email protected]> wrote: > > > At his Devoxx talk, Dick casually mentioned that making final fields public > > was now a best practice. I do this sometimes on my non-work projects, but > > feel a little dirty. I doubt it would fly at work. > > > I thought it was too trivial a point to bring up as a question after the > > talk, but what do you guys think? Is making final fields public acceptable? > > > Moandji -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=.
