aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 8898

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: 24166
    
  30

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: 8898

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
keyword used as variable name
Setting attributes in Tag files
System.arraycopy speed.
Issue in Struts Dropdown(Need Help Ranchers)
Multiple Values in JSP