This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other Languages and the fly likes variable conventions in ruby 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 » Languages » Other Languages
Bookmark "variable conventions in ruby" Watch "variable conventions in ruby" New topic
Author

variable conventions in ruby

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

I was reading a tutorial on Ruby which talks about variable name conventions such a class name variable must start with "@@". Why is this required .. why not let the developer to take the decision?


Groovy
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

In Java, you always declare variables, and you use "static" to make something a class variable. In Ruby, you don't declare things, and you use naming conventions to tell Ruby what kind of a thing it is. Just how it works.


[Jess in Action][AskingGoodQuestions]
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

Thanks
gao zhixin
Ranch Hand

Joined: Jan 18, 2006
Posts: 42
I think Ruby's name convention is better than Java
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: variable conventions in ruby
 
Similar Threads
Issue in Struts Dropdown(Need Help Ranchers)
Setting attributes in Tag files
Multiple Values in JSP
System.arraycopy speed.
keyword used as variable name