|
Re: direct access to swt classes' fields [message #504815 is a reply to message #504794] |
Tue, 22 December 2009 19:06 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
Hi,
Though this might not be an authorotive answer here's my interpreation:
* Point, Rectangular are more like structs to pass a round multiple
values
* SWT tries to be as small as possible so there's no overhead needed
for such often access fields which might not be a problem in
Desktop-Envs but think of a paint event access in a embedded device.
Tom
Am 22.12.09 18:24, schrieb Luca Ferrari:
> Hi,
> maybe this is a really trivial question, but I don't understand why most
> classes of SWT (e.g., Point, Rectangular, PaintEvent,...) provide direct
> access to their members instead of using getters. While both using
> getters and direct access provide the same result, making a field public
> means there will be no way to change the way it is accessed. What is the
> design choice that lead this?
|
|
|
Powered by
FUDForum. Page generated in 0.03912 seconds