Meaningless Drivel is fun!
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
JavaRanch » Java Forums » Languages » Other Languages
Bookmark "variable conventions in ruby" Watch "variable conventions in ruby" New topic

variable conventions in ruby

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8927

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?

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

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

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:
subject: variable conventions in ruby
jQuery in Action, 3rd edition