From: Nathaniel Talbott Date: 2003-01-17T07:15:57+09:00 Subject: Re: ruby-dev summary 19198-19345 Eric Schwartz said: > Mauricio Fern�ndez writes: >> 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 > > $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? I don't suppose this would parse very well (seems that it would conflict with already existing syntax), but it would be nice: s1 = <<"I "am "#{interpolated} s2 = <<'I 'am 'not '#{interpolated} Whether it be '|' or something else, what I like about nobu's proposal with Dave's suggested modification is that it's easy to see visually where the doc ends, and there's no wacky end terminator hanging out (apparently) in the middle of nowhere. Just my $0.02, Nathaniel