On 8/25/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
>
>
> Finally, I'd like to hear a good argument why we shouldn't just say:
> if you want to access members directly, just make them public. If you
> want to avoid clutter (i.e. writing getters and setters) and you don't
> care about breaking encapsulation, why not do it the Java-way? Saying
> that you don't want to expose your members for normal Java
> programming, but do want to expose those members when using a property
> model strikes me as having a double standard.


first of all the bean spec is _not_ the java way. it is just a spec, widely
adopted though it is - just like jsf. second of all we _are_ doing it the
java way. reflection has access to private fields and property model uses
reflection, that is the java way. and third of all i think this _helps_
preserve encapsulation not break it. this whole argument started because
someone _looked_ at the javadoc and said "oh crap this can access private
fields, oh no this is so anti java!", a purely theoretical concern, that
will probably never have a sideeffect in real life while providing
significant real life benefits.

-igor

My 2c,
>
> Eelco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to