Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Dale Matthews   on Jul 04 In Java Category.

  
Question Answered By: Jaime Bowman   on Jul 04

I'll check it out. The
guidelines you listed are ones I agree with and regularly
adhere to. The part I'm wrestling with has to do with a
tendency of some people to include something in the name
to indicate the type such as strFirstName, intAge,
blnActive, btnOK etc. I seems to me that this could work if
a program sticks to the basics but with object
oriented programming and the limitless supply of classes
that are out there, trying to come up with meaningful
abbreviations could prove frustrating. I suppose we could
include the complete name of the class in the name of the
object but sheesh!<br><br>What's the advantages of
including the type in the name? So you don't have to seek
out the declaration in the code to find out the type?
One convention that I have seen (and used) that seems
helpful is prefixes of "m_" or "l_" to indicate the scope
of member  or local variables.<br><br>Thank you for
the book recommendation

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Naming conventions Or get search suggestion and latest updates.


Tagged: