Re: [jruby-dev] JRuby Style Guide

2007-06-14 Thread Alexey Verkhovsky
On 6/14/07, Tim Bray <[EMAIL PROTECTED]> wrote: Even better, bloody well use parentheses, then you don't have to clutter up your memory with this junk. Nor do the people who will have to read your code. -Tim Stuff like render :text => 'foo' and return is widely used. As in "I've seen it in

Re: [jruby-dev] JRuby Style Guide

2007-06-14 Thread Zachary Holt
On Jun 14, 2007, at 4:24 PM, Tim Bray wrote: Even better, bloody well use parentheses, then you don't have to clutter up your memory with this junk. Nor do the people who will have to read your code. -Tim My code's invisible. Fair enough about parenthesizing. My main point was that &&, |

Re: [jruby-dev] JRuby Style Guide

2007-06-14 Thread Tim Bray
On Jun 14, 2007, at 4:06 PM, Zachary Holt wrote: Use "and" and "or" if you know what they do. Even better, bloody well use parentheses, then you don't have to clutter up your memory with this junk. Nor do the people who will have to read your code. -Tim -

Re: [jruby-dev] JRuby Style Guide

2007-06-14 Thread Zachary Holt
On Jun 14, 2007, at 3:38 PM, Eric Armstrong wrote: Alexey Verkhovsky wrote: On 5/31/07, Eric Armstrong <[EMAIL PROTECTED]> wrote: Ruby Code: - always use && and ||, not 'and' and 'or' Why is that? For consistency with Java? Or is there some other benefit? This is a convention in Rails core.

Re: [jruby-dev] JRuby Style Guide

2007-06-14 Thread Eric Armstrong
Alexey Verkhovsky wrote: On 5/31/07, Eric Armstrong <[EMAIL PROTECTED]> wrote: Ruby Code: - always use && and ||, not 'and' and 'or' Why is that? For consistency with Java? Or is there some other benefit? This is a convention in Rails core. Its origin is that 'and' and 'or' have priority low

Re: [jruby-dev] JRuby Style Guide

2007-05-31 Thread Mark Aufflick
I guess I'm used to the &&, || v and, or thing as a long time Perl programmer, but why not use them as they are made? &&, || : normally. and, or : when you specifically want the lower precedence operator. The language specification gives them particular (and useful) meaning, I don't think you wa

Re: [jruby-dev] JRuby Style Guide

2007-05-31 Thread Charles Oliver Nutter
Alexey Verkhovsky wrote: Personally, I like 'and' and 'or' because it often reads better than && and ||. Especially in statement like redirect_to :action => "show" and return or foo = find_foo or raise 'Foo not found' I'm not opposed to and/or for these cases. Perhaps it's better to say "al

Re: [jruby-dev] JRuby Style Guide

2007-05-31 Thread Alexey Verkhovsky
On 5/31/07, Eric Armstrong <[EMAIL PROTECTED]> wrote: Ruby Code: - always use && and ||, not 'and' and 'or' Why is that? For consistency with Java? Or is there some other benefit? This is a convention in Rails core. Its origin is that 'and' and 'or' have priority lower than && and ||, and lo

Re: [jruby-dev] JRuby Style Guide

2007-05-31 Thread Eric Armstrong
Weighing in late. All of these make sense to me, except for this one: > Ruby Code: > - always use && and ||, not 'and' and 'or' Why is that? For consistency with Java? Or is there some other benefit? Charles Oliver Nutter wrote: First a thread, then a wiki page after everyone's weighed in. Foll

Re: [jruby-dev] JRuby Style Guide

2007-04-22 Thread Charles Oliver Nutter
Charles Oliver Nutter wrote: First a thread, then a wiki page after everyone's weighed in. Following these guidelines will make it easier for us to apply patches (at present we have to clean them up by hand...) Added at http://www.headius.com/jrubywiki/index.php/JRuby_Style_Guide - Charlie -

Re: [jruby-dev] JRuby Style Guide

2007-04-22 Thread Ryan Bell
seems reasonable to me On 4/22/07, Charles Oliver Nutter <[EMAIL PROTECTED]> wrote: First a thread, then a wiki page after everyone's weighed in. Following these guidelines will make it easier for us to apply patches (at present we have to clean them up by hand...) Jump in and add more to this

[jruby-dev] JRuby Style Guide

2007-04-22 Thread Charles Oliver Nutter
First a thread, then a wiki page after everyone's weighed in. Following these guidelines will make it easier for us to apply patches (at present we have to clean them up by hand...) Jump in and add more to this list. Java Code: - if statements with no braces are fine, if they stay on the same