From: boris Date: 2002-02-03T23:03:00+09:00 Subject: Re: Variable types On Sun, Feb 03, 2002 at 06:51:11AM +0900, James Britt (rubydev) muttered... : > On Sun, 3 Feb 2002, David Corbin wrote: : > : > > I know I'm new to ruby, but I feel obligated to share my dislike for : > > "special symbols" to indicate if a symbol is a member, local variable or : > > global variable. Perhaps I don't know enough to make such a comment, : > > and someone will show me my mistunderstanding. : > > : > > Anyone else think like I do? : > : > I sort of like $ for global variables because it makes it easy to : > tell where you've used them and therefore need to rewrite your : > code :-) : : I'm a little put off by required prefixes; it's basically the language forcing you to use : a particular coding style. It's perhaps not as bad as telling you how to use white space, : but in the same realm. : : On the other hand, these prefixes allow you to create, say, a global variable wherever you : like, obviating the normal scoping rules: True, but your example is a classic case of "where does it come from". It's that same thing that drives me nuts about php, and perl - variables just appear out of no where. [makes debugging other peoples code a nightmare to debug, esp when you have a case sensitive language], I am from the camp where variables should be declared - that way everyone knows what the score is :) Regards, Chris -- +------------------------------------------------------------------+ | Chris Ross | chris@darkrock.co.uk | ctr@ferite.org | | | http://www.darkrock.co.uk | http://www.ferite.org | +------------------------------------------------------------------+ "I come from Alabama with a Tagline on my knee."