From: "Mauricio Fernández" Date: 2003-01-17T07:11:15+09:00 Subject: Re: ruby-dev summary 19198-19345 On Fri, Jan 17, 2003 at 07:03:11AM +0900, Eric Schwartz wrote: > Mauricio Fern�ndez writes: > > On Fri, Jan 17, 2003 at 02:35:55AM +0900, nobu.nokada@softhome.net wrote: > > > It looks nice, and once I got inclined to it. But now we have > > > 3 types of string literals, with string interpolation as > > > doublequote, without it as singlequote, and command > > > substitution as backquote. I wonder which it corresponds to. > > > > We can impose a different character for each type: > > s = <<|Hello > > |I am #{interpoladed} > > s2 = <<.I > > .am > > .not interpolated! > > Ick. I much prefer Perl's version, where This is the same way in Ruby, too. > $foo = < bah, this is $interpolated > EOSTR > > is interpolated and > > $bar = <<'EOSTR'; > $this is a literal '$' followed by 'this'. > EOSTR > > is not. Using separate characters like that is just asking for > confusion, to my mind, especially when they don't have any prior > associations to enhance their meaning. Why not at least reuse the > ones we already have? s =<<" " I am #{Interpolated} s =<<' ' I am not! The problem is it might be difficult to make it work with what we have now: int, notint = <<"INT", <<'NOTINT' I am interpolated INT I am not NOTINT -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com Being overloaded is the sign of a true Debian maintainer. -- JHM on #Debian