Re: Access to public fields

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Access to public fields

Leos Literak
Attila Szegedi napsal(a):
>>> public fields of classes, however:
>>> - properties override fields, so if you have both "public int foo" and
>>> "public int getFoo()", then getFoo() gets called
>>> - methods also override fields, so if you have both "public int foo" and
>>> "public void foo()" then obj.foo will return the method.
>> Attila, do you plan to commit your changes to SVN?
>
> I take it you'd find the feature useful yourself?


Personally I don' like such direct access too. I prefer getters/setters,
as I have already written. Nonetheless if developer exposed his
class variables as public, let's let him shoot his own leg ;-)

Leos


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
FreeMarker-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel