From: James Britt Date: 2004-03-24T00:57:07+09:00 Subject: Re: Ruby style guidance gabriele renzi wrote: > il Tue, 23 Mar 2004 06:25:36 -0800, "David A. Black" > ha scritto:: > > >>Hi -- >> >>On Tue, 23 Mar 2004, gabriele renzi wrote: >> >> >>>Seriously, it would be nice to have some kind of Style Guidelines >>>somewhere (like using CamelCase for classes and under_scores for >>>methods, provide block form for accessing resource that need to be >>>freed and so on) There's a sort-of style guide on the rubygarden wiki, but it conflates style guidelines with idiomatic coding techniques. I suggest: Style guideline = naming conventions; use of do/end vs. { ... }; indentation Ruby idioms = Using blocks to manage resource allocation and release; use of ||= to assign only if variable has no current value, etc. I'd rather see these two things maintained separately, so that newcomers can first pick up the proper coding *style*, then start using Ruby Way coding *techniques* as they learn the reasoning behind them. (And I think that may define the difference between code style and idiomatic technique; the former is largely aesthetic, while the latter is best practice based on the features of the language.) James