On Sat, 12 Apr 2003 04:13:52 +0900
Daniel Carrera <dcarrera / math.umd.edu> wrote:
<snip>
> In nearly all cases, when I use * I mean multiplication. For me, the use
> 'a(*b)' is so uncommon, that when that's what I want I write it explicitly
> to avoid ambiguity.
>
> I would set the default parsing to (foo)*(1.1) in all cases, and only use
> 'foo(*1.1)' when explicitly stated.
<snip>
For me it's the other way around. I have yet to use any multiplication
in this object system, but I use *args _quite_ a bit. Everything from
argument list forwarding to widget parameter passing:
o = Class.new_on(connection, :volume, arg0, ...)
r = Row.new(1, 2, 3) # Row#new declares with *args
# or
a = [1, 2, 3]
# do stuff to a
r = Row.new *a
It all depends on context, and unfortunately there's no way for ruby
to know the context. I believe it's just the same thing as the "1+ 1"
problem. Besides, if your code looks like that, you really should make
it look nicer. ;-) ;-)
--
Ryan Pavlik <rpav / users.sf.net>
"That's the first pratical line of thinking to
come out of your word hole since we first met." - 8BT