GGarramuno / aol.com (GGarramuno) wrote in message news:<af53b0ba.0406012346.42f73e84 / posting.google.com>...
....
> > Sam Sungshik Kong wrote in [ruby-talk:102028]:
> > > s = "My name is %(name)s and my age is %(age)d." % {"name": "Sam", "age": 
> > > 34}
....
> Do you have an example on how would you use this?  I ask because I
> would also vote strongly against it.
....
> To achieve the above for quick testing, it is much easier and readable
> to just do:
> s = "My name is #{'Sam'} and my age is #{34}."

Not that I'd vote for the RCR, but here's something that you can't
(easily) do with the syntax you suggest:

  FOO_en = "Some string about %{blah} that is reused in about "+
        "%{value} different places in the program."
  FOO_de = "In %{value} Plaetze in Dieser Programme findet Das Satz
ueber "+
        " %{blah}."
  LANGS = { :en => FOO_en, :de => FOO_de }
  ...
  def print_foo( args )
    puts LANGS[ @lang ] % {"blah" => "apples", "value" => "a hundred"
}
  end

(Sorry for butchering the German. It has been a long, long while since
I've used it.)

--- SER