Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #19129
| From | Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: nomenclature |
| Date | 2012-10-05 16:38 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <slrnk6u393.u9l.avl@gamma.logic.tuwien.ac.at> (permalink) |
| References | <70c1d214-71ac-478d-95d7-a5984c3dc180@googlegroups.com> <k4fms9$vi3$1@dont-email.me> |
Eric Sosman <esosman@ieee-dot-org.invalid> wrote:
> private final double _goodName;
> public Thing(double goodName) {
> _goodName = goodName;
> }
I admit using a "m_" prefix on fields:
private final double m_goodName;
public Thing(double goodName) {
m_goodName = goodName;
}
I got into that habit in my early days of C++ with (gasp)
some Microsoft IDE. I'm not completely following that
style, though, as I typically don't use type-hints after
the underscore.
Sometimes I even do that, like when I think that goodName
looks strange, but xGoodName looks much less strange. Also,
when there is a goodName for some item, but two different
representations for it, then I might do something roughly
like:
private int m_iGoodName;
private String m_sGoodName;
public void setGoodName(int iGoodName) {
m_iGoodName=iGoodName;
m_sGoodName=""+iGoodName;
}
public void setGoodName(String sGoodName) {
m_sGoodName=sGoodName;
m_sGoodName=Integer.parseInt(sGoodName);
}
I guess you now feel like asking what name (and type) I use
for the getter, but that's beyond the scope of the example.
;-)
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
nomenclature bob smith <bob@coolfone.comze.com> - 2012-10-02 12:51 -0700
Re: nomenclature Arne Vajhøj <arne@vajhoej.dk> - 2012-10-02 15:58 -0400
Re: nomenclature Patricia Shanahan <pats@acm.org> - 2012-10-02 13:05 -0700
Re: nomenclature Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-10-02 13:18 -0700
Re: nomenclature Lew <lewbloch@gmail.com> - 2012-10-02 13:22 -0700
Re: nomenclature Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-10-02 13:47 -0700
Re: nomenclature markspace <-@.> - 2012-10-02 14:27 -0700
Re: nomenclature Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-10-02 17:38 -0400
Re: nomenclature Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-10-05 16:38 +0000
Re: nomenclature Arne Vajhøj <arne@vajhoej.dk> - 2012-10-05 20:28 -0400
Re: nomenclature Roedy Green <see_website@mindprod.com.invalid> - 2012-10-03 16:02 -0700
csiph-web