From: Aredridel Date: 2004-03-24T04:38:23+09:00 Subject: Re: Need some advice on PickAxe II On Wed, Mar 24, 2004 at 02:44:30AM +0900, Simon Strandgaard wrote: > In Ruby I don't feel a need to distinguish between methods and variables. > However in C++ I do use CamelCase to identify functions and under_scores to > identify variables, but thats because functions in C++ needs to be > supplied a (); suffix. > > In Ruby there is no need for a (); suffix. A few times I have found myself > changing a variable into a method. I didn't have to change anything, > it made me relieved. > > Why distinguish between methods and variables ? That's exactly one reason I use ruby: uniform access. I often make variable-like methods -- they make sense to me. The value of either will be an object, so why distinguish? That's what makes attr_* methods work so well -- the methods it creates play the role of the variables they wrap so well that one doesn't have to bother remembering there's a difference. Ari