https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17097754782011-09-23T10:37:04ZRuby Issue Tracking SystemRuby master - Feature #5352: How about using <> to represent Here Document?https://bugs.ruby-lang.org/issues/5352?journal_id=209432011-09-23T10:37:04Zduerst (Martin Dürst)duerst@it.aoyama.ac.jp
<ul></ul><p>If anything is done in this direction, I'd prefer</p>
<pre><code class="ruby syntaxhl" data-language="ruby"> <span class="n">str</span> <span class="o">=</span> <span class="o"><></span><span class="no">SECT1</span><span class="p">.</span><span class="nf">upcase</span> <span class="o">+</span> <span class="o"><></span><span class="no">SECT2</span><span class="p">.</span><span class="nf">downcase</span>
</code></pre>
<p>over</p>
<pre><code class="ruby syntaxhl" data-language="ruby"> <span class="n">str</span> <span class="o">=</span> <span class="o"><</span><span class="no">SECT1</span><span class="o">></span><span class="p">.</span><span class="nf">upcase</span> <span class="o">+</span> <span class="o"><</span><span class="no">SECT2</span><span class="o">></span><span class="p">.</span><span class="nf">downcase</span>
</code></pre>
<p>It seems to stick out much better.</p> Ruby master - Feature #5352: How about using <> to represent Here Document?https://bugs.ruby-lang.org/issues/5352?journal_id=209452011-09-23T10:53:27Zyeban (Anurag Priyam)anurag08priyam@gmail.com
<ul></ul><p>On Fri, Sep 23, 2011 at 7:08 AM, Martin Dürst <a href="mailto:duerst@it.aoyama.ac.jp" class="email">duerst@it.aoyama.ac.jp</a> wrote:<br>
[...]</p>
<blockquote>
<p>If anything is done in this direction, I'd prefer<br>
 str</p>
</blockquote> Ruby master - Feature #5352: How about using <> to represent Here Document?https://bugs.ruby-lang.org/issues/5352?journal_id=209582011-09-24T05:25:07Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>Joey Zhou wrote:</p>
<blockquote>
<p>Unlike Perl, in which "<>" is a very very frequently used operator to read lines from a filehandle, in Ruby, "<>" has no meaning. So I think it can be used to represent Here Document, so as to reduce the possibility of misunderstanding method "<<" and here-document token "<<". And In my opinion, <> is more clear than <<, because it looks like kind of brackets.</p>
</blockquote>
<p>I'm somewhat negative.<br>
It looks like Perl's "<>" but is pretty different, so I'm afraid that it would be also confusing.</p> Ruby master - Feature #5352: How about using <> to represent Here Document?https://bugs.ruby-lang.org/issues/5352?journal_id=209802011-09-26T00:06:24Zyimutang (Joey Zhou)
<ul></ul><p>Nobuyoshi Nakada wrote:</p>
<blockquote>
<p>I'm somewhat negative.<br>
It looks like Perl's "<>" but is pretty different, so I'm afraid that it would be also confusing.</p>
</blockquote>
<p>There are a few things different in Ruby and Perl.</p>
<p>$foo is not a scalar, @bar is not an array, %w is not a hash</p>
<p>"re = /pattern/" in Ruby means assigning a regexp to re, but in Perl "$re = /pattern/" means "$re = $_ =~ /pattern/"...</p>
<p>So I think the difference is not a problem, some differences already exist.</p>
<p>"<<" of Perl has two meanings: shifting bits and here document. One is for the integers and the other is for the string, maybe leading to less confusing. However, in Ruby, "<<" is instance method of String and IO/File, and here document is also string, the probability of confusing is larger, I'm afraid.</p> Ruby master - Feature #5352: How about using <> to represent Here Document?https://bugs.ruby-lang.org/issues/5352?journal_id=252152012-03-27T03:07:59Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>matz (Yukihiro Matsumoto)</i></li></ul> Ruby master - Feature #5352: How about using <> to represent Here Document?https://bugs.ruby-lang.org/issues/5352?journal_id=332522012-11-20T21:50:09Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Target version</strong> set to <i>3.0</i></li></ul> Ruby master - Feature #5352: How about using <> to represent Here Document?https://bugs.ruby-lang.org/issues/5352?journal_id=715532018-04-19T07:49:15Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/71553/diff?detail_id=48976">diff</a>)</li></ul> Ruby master - Feature #5352: How about using <> to represent Here Document?https://bugs.ruby-lang.org/issues/5352?journal_id=715552018-04-19T07:52:26Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Rejected</i></li></ul><p>Rejected. I don't want to change the basic syntax (without major benefit). Besides that, I want to keep <code><></code> for future syntax extension.</p>
<p>Matz.</p>