|
From: Walden H. Leverich
Does "myvar = x" really indicate that you
are calling something as well as "setMyvar(x)"?
To my way of thinking (again opinion and style) getter/setter "methods"
are extremely lightweight, where method calls may not be.
What I do like is that if I have to add a second parameter to the
setter, I already have the code in place and I just have to add
the variable, whereas if I have to change the
"myvar = x" syntax, it's more of a change.
OK, so actually, "setter" and "getter" are a convention thing in Java,
not a language thing? Correct? Does Java have "properties" as part of
the language spec?
In the .net mvar=x syntax there is _no way_ you could add a second parm
to a setter or getter.
If you wanted to add a "second" parm to your you're create a method that
did what you wanted.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.