[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:02218] Re: parse bug in 1.5

From: schneik@...
Date: 2000-03-28 19:17:57 UTC
List: ruby-talk #2218

Mirko Nasato wrote:
> Dave Thomas wrote:
> >
> > > Well, however this issue is resolved, maybe "always use parens" (in
> > > the sorts of contexts we have been discussing) should be something
> > > that a Ruby "strict mode" should require, and maybe verbose mode
> > > should always warn about it.
> >
> > FWIW, in the book we're recommending that people use parens, but...
> >
> >   p a.zip
> >
> > would become
> >
> >   p(a.zip())
> >
> > Which looks different, and messier, to my eyes.
> >
> As a personal rule, i happily avoid parens when the method doesn't
require
> any argument, and always use them when passing one or more args (except
for
> builtins such as print).
>
> I adore not to be forced to use parens for no-args methods, because i
like
> to think there is no real difference in meaning between getting the value
> of a variable and calling a no-args method which returns a value, so the
> syntax can be the same, too.
>
> Should there ever be a Ruby "strict mode", i sincerely hope it won't
> complain in such cases.

When I said,

<<... "always use parens" (in the sorts of contexts we have been
discussing) ...>>

above, I probably should have been more explicit and said something more
like: always use parens in the sorts of cases that tend to be prone to
misinterpretation or misunderstanding.

So is there a reasonably clear cut dividing line between such cases?

Conrad Schneiker
(This note is unofficial and subject to improvement without notice.)


In This Thread

Prev Next