File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Solution for verbosity of JAVA - have SQL like ALIAS for Java ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Solution for verbosity of JAVA - have SQL like ALIAS for Java ?" Watch "Solution for verbosity of JAVA - have SQL like ALIAS for Java ?" New topic
Author

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

Andy Jack
Ranch Hand

Joined: Nov 22, 2012
Posts: 257
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 ?

Java Newbie with 72% in OCJP/SCJP - Super Confused Jobless Programmer.
I am a "newbie" too. Please verify my answers before you accept them.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9960
    
163

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.

[My Blog] [JavaRanch Journal]
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11170
    
  16

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.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
Consider Paul's rocket mass heater.
 
subject: Solution for verbosity of JAVA - have SQL like ALIAS for Java ?
 
Similar Threads
Aliasing
org.hibernate.exception.SQLGrammarException: could not execute query
Issues when porting to production server - requested resource not available.
Doubt in Images of AWT?
Identifying Mac Aliases