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
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 &&, |
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
-
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.
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
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
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
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
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
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
-
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
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
12 matches
Mail list logo