From: "Mauricio Fernández" Date: 2003-01-17T07:07:00+09:00 Subject: Re: ruby-dev summary 19198-19345 On Fri, Jan 17, 2003 at 06:54:36AM +0900, nobu.nokada@softhome.net wrote: > Hi, > > At Fri, 17 Jan 2003 06:32:48 +0900, > Mauricio Fern�ndez wrote: > > > > For what it's worth, I don't like this much either. But I still think > > > > there's some merit in > > > > > > > > s = <<|Hello > > > > |World > > > > > > > > I often use inline, multi-line strings, and being able to set a margin > > > > for them would be quite useful. > > > > > > 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! > > We can, but it'll enforce to remember magical relation, whereas > quotations surrounding here-doc marker look more obvious, to me > at least. Then we need a new syntax... I don't quite like the following but it's the best I can think of right now: s = <<<"|" |Hello, #{interpolated} s2 = <<<'|' | not interpolated! > > BTW, how accesible is '|' in keyboards around the world? In Spanish ones > > you need AltGR and the 2 keys are quite far away... OTOH I think it was > > a single keypress in German keyboards (will check tomorrow). > > It needs SHIFT and 1 key in Japanese 106/109 keyboard and same > in English 101/104. If we take over the world we could have a special keyboard for coding in Ruby ;-) -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com And Bruce is effectively building BruceIX -- Alan Cox