[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: RE: [platform-swt-dev] org.eclipse.swt.SWT
|
Hi Weiqi!
I welcome your argument against getters, setters.
>>1. They are not object-oriented.
If you mean Object Oriented as in Polymorphic, Encapsulated, Inheritable
etc etc, setters and getters are are definitely OO. In addition to that,
when the users set an invalid value, you can throw an exception "when (s)he
sets the value" not at a later time when the value is being used.
>>2. They are goofy.
When? They are goofy if you do not need all the above features.
I do not think that OO should be applied all the time. Take the example of
SWT's Point class. It does not require those features of OO. There is no
need to check whether the value is valid or not (as in case of a point, any
integer value is a valid value; even negative ones!). But then there is a
question of consistency of APIs. But that's another issue.
If your reply was in jest, sorry I misunderstood ;-)
Thanks and Regards
Indukumar
Weiqi Gao
<weiqigao@xxxxxxxxxxxxx To: platform-swt-dev@xxxxxxxxxxx
t> cc:
Sent by: Subject: RE: RE: [platform-swt-dev]
platform-swt-dev-admin@ org.eclipse.swt.SWT
eclipse.org
02/28/2003 01:47 PM
Please respond to
platform-swt-dev
On Fri, 2003-02-28 at 03:17, vellapillli_h.indukumar@xxxxxxxxxx wrote:
>
> If you have good
> arguments against some usage of setters-getters, provide them.
Is that all? A hundred post thread about setters and getters? Well,
here's some arguments against setters and getters:
1. They are not object-oriented.
2. They are goofy.
--
Weiqi Gao
weiqigao@xxxxxxxxxxxxxx
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev