Hey Folks,

I've been noticing more and more while looking through other people's code
that differentiating between local variables and method calls can be quite a
laborious undertaking in Ruby. Plus it hurts my head after a while of
reading through gems or plugins, especially on long and complicated methods
(which you shouldn't have anyway).

The special thing about Ruby is that you don't HAVE to do all the syntax
stuff of other languages, like declare variables and type cast.

I think it is still a good practice, for readability's sake, and I wanted to
ask you all:
*
What do you use to differentiate local vars from methods? *

Do you use the method_name() syntax for functions that don't take any
arguments, or do you throw in an _ at the beginning of
_local_variable_names?

I tried the _ for a bit, but realized REAL quick that it made my code
completely unsightly! I threw the _ on the end, but thats just confusing.
Example =>  your_special_item_.save!

Or do you just roll with the undifferentiated forms?

I'm curious...

- Adam

--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to