jackdaw icon indicating copy to clipboard operation
jackdaw copied to clipboard

Support field prefixes

Open akokuliuk opened this issue 10 years ago • 5 comments

are you support prefixes for field, like "mName"?

akokuliuk avatar May 07 '15 11:05 akokuliuk

No, for what purpose? I think prefixes are generally used in languages like C or C++, but not in Java.

vbauer avatar May 07 '15 11:05 vbauer

Prefixews in java are good practice, because prefix tells you a scope of this variable, for example when you see variable with prefix "m", you than this variable is field, or var with "_" - is static variable etc.

akokuliuk avatar May 07 '15 16:05 akokuliuk

I have been developing on Java for 10 years and do not know a lot of projects with prefixes. Usually IDEs (or syntax highlighters) use different font styles and colors to show this information, for example Intellij IDEA shows:

  • "static" variables with cursive font
  • "final" variables with bold font
  • field variables with bold non-cursive font

vbauer avatar May 07 '15 16:05 vbauer

I need to think about this feature, maybe it could sense for some developers.

vbauer avatar May 07 '15 16:05 vbauer

Another example: when you need to find and use class field, you may type, for example, "m" and autocomplete shows you all class members.

akokuliuk avatar May 08 '15 06:05 akokuliuk