From: David Alan Black Date: 2004-05-12T07:38:51+09:00 Subject: Re: Code Conventions for Ruby Hi -- "Dave Burt" writes: > > ... Code Conventions for Ruby ... ? > > TMTOWTDI But even in Perl, whose motto that is, that doesn't mean everything is equally smiled upon; Perl actually comes with a style guide :-) > A bit like Perl, which can get messy, except the language itself, by things > like newlines instead of semicolons, encourages you to write legibly (or > maybe the newlines/semicolons thing is the only way). > > Actually, now I think more about it, there seems to be almost a de-facto > standard of two spaces per indentation level. > > And, now I do some research, I find that there's the start of a collection > of this kind of thing in the RubyGarden: > http://www.rubygarden.org/ruby?RubyStyleGuide See also: http://pub.cozmixng.org/~the-rwiki/rw-cgi.rb?cmd=view;name=RubyCodingConvention You can also look to the Ruby core library for guidance on style matters. It's not completely uniform but it's very close in certain matters that come up again and again (indentation, variable_names, etc.). That way, even if you decide to depart from aspects of Matz's style, you'll at least know you're doing so :-) David -- David A. Black dblack@wobblini.net