Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Solution for verbosity of JAVA - have SQL like ALIAS for Java ?  RSS feed

 
Andy Jack
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I often use verbose names for sake of clarity. Looks like we should have alias for java.
int whatsMyAge = 10;
whatsMyAge AS wma;

what do you think ?
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I like self explaining names (be it for methods, variables or classes). I don't consider it a problem which demands a solution.

As for:

int whatsMyAge = 10;
whatsMyAge AS wma;


Are you bothered about "whatsMyAge" because it takes longer to type or because it appears verbose while reading code? If it's the former then with the current IDEs, you get auto-completion feature which makes it a non-issue.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12529
48
Chrome Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I were doing a code review and someone used a variable name "wma", I'd tell them to go back and expand it so I don't have to hunt around to figure out what it means.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!