• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

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

 
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 ?
 
Sheriff
Posts: 10445
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.
 
lowercase baba
Posts: 12751
51
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!