[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] SWT Event class design

Ah, now I see. I actually though you were referring to brainless getters and setters since this seems to be quite common in the Java world.

On 31 jan 2011, at 15:33, petru lincu wrote:

I'm not referring to those brainless getters and setters that do nothing but expose the private member variables.
What I would like to know is why isn't there any consistency check for e.g. negative heights and wights or a diposed widget or invalid thread access, etc.

--- On Sun, 1/30/11, Jacob <doobnet@xxxxxxxxx> wrote:

From: Jacob <doobnet@xxxxxxxxx>
Subject: Re: [platform-swt-dev] SWT Event class design
To: "Eclipse Platform SWT component developers list." <platform-swt-dev@xxxxxxxxxxx>
Date: Sunday, January 30, 2011, 2:55 AM

Yes, but that would be the case if you had setters as well. If you only have getters then I see your point.

/Jacob Carlborg

On 28 jan 2011, at 23:36, Greg Brown wrote:

The fact that they are public fields means that anyone can modify them and change the nature of the event. Seems like an odd design to me, but maybe there is a reason for it.

On Jan 28, 2011, at 4:13 PM, Jacob wrote:

What would be the point to have methods if they just forward to the instance variables?

/Jacob Carlborg

On 28 jan 2011, at 11:21, petru lincu wrote:

Hi,

I would like to know what is the reason why Event class is designed with public fields instead of private with getters and setters methods.

Thanks and Best Regards,
Iulian

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


-----Inline Attachment Follows-----

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev