https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112011-07-21T15:47:13ZRuby Issue Tracking SystemRuby master - Feature #5065: Allow "}" as an alternative to "end"https://redmine.ruby-lang.org/issues/5065?journal_id=194582011-07-21T15:47:13Ztechnohippy (Yasushi ANDO)andyjpn@gmail.com
<ul></ul><p>Your request looks nice for me. Additionally endall will be used at the end of file in most cases, so it's useful if EOF is interpreted as your endall.</p> Ruby master - Feature #5065: Allow "}" as an alternative to "end"https://redmine.ruby-lang.org/issues/5065?journal_id=194682011-07-21T20:53:10Zaprescott (Adam Prescott)
<ul></ul><p>On Thu, Jul 21, 2011 at 6:28 AM, Lazaridis Ilias <a href="mailto:ilias@lazaridis.com" class="email">ilias@lazaridis.com</a>wrote:</p>
<blockquote>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">module</span> <span class="nn">MyModule</span>
<span class="k">class</span> <span class="nc">MyClass</span>
<span class="k">def</span> <span class="nf">my_method</span>
<span class="mi">10</span><span class="p">.</span><span class="nf">times</span> <span class="p">{</span> <span class="c1"># "10.times do" would work, too</span>
<span class="k">if</span> <span class="nb">rand</span> <span class="o"><</span> <span class="mf">0.5</span>
<span class="nb">p</span> <span class="ss">:small</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
</blockquote>
<p>I can't say I like this proposal, or my own thoughts below, but I would<br>
expect this, instead:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">module</span> <span class="nn">MyModule</span> <span class="p">{</span>
<span class="k">class</span> <span class="nc">MyClass</span> <span class="p">{</span>
<span class="k">def</span> <span class="nf">my_method</span> <span class="p">{</span>
<span class="mi">10</span><span class="p">.</span><span class="nf">times</span> <span class="p">{</span> <span class="c1"># "10.times do" would work, too</span>
<span class="k">if</span> <span class="nb">rand</span> <span class="o"><</span> <span class="mf">0.5</span> <span class="p">{</span>
<span class="nb">p</span> <span class="ss">:small</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
<p>This keeps things consistent with blocks, e.g. <code>10.times { ... }</code>, and makes<br>
sure there are matching pairs.</p>
<p>That said, seeing "<code>class MyClass {</code>" is too great a deviation from existing<br>
Ruby syntax for me to find it acceptable, personally; one of the enjoyable<br>
things about Ruby is the lack of line noise, and this would probably count<br>
as noise added.</p> Ruby master - Feature #5065: Allow "}" as an alternative to "end"https://redmine.ruby-lang.org/issues/5065?journal_id=195022011-07-22T07:17:57Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul><li><strong>Category</strong> set to <i>Joke</i></li></ul><p>Switched categories to match <a class="issue tracker-2 status-6 priority-4 priority-default closed" title="Feature: Compress a sequence of ends (Rejected)" href="https://redmine.ruby-lang.org/issues/5054">#5054</a></p> Ruby master - Feature #5065: Allow "}" as an alternative to "end"https://redmine.ruby-lang.org/issues/5065?journal_id=195092011-07-22T10:29:37Zlazaridis.com (Lazaridis Ilias)ilias@lazaridis.com
<ul></ul><p>Eric Hodel wrote:</p>
<blockquote>
<p>Switched categories to match <a class="issue tracker-2 status-6 priority-4 priority-default closed" title="Feature: Compress a sequence of ends (Rejected)" href="https://redmine.ruby-lang.org/issues/5054">#5054</a></p>
</blockquote>
<p>Mr. Hodel, I understand your friendly intention, but I didn't meant to "extend" the joke in <a class="issue tracker-2 status-6 priority-4 priority-default closed" title="Feature: Compress a sequence of ends (Rejected)" href="https://redmine.ruby-lang.org/issues/5054">#5054</a> (btw: I find an "endall" not a joke, but a worthy construct, too).</p>
<p>I would really like to have the ability to use "}" (or possibly another char) in order to end a block started by "module, class, def" etc.</p> Ruby master - Feature #5065: Allow "}" as an alternative to "end"https://redmine.ruby-lang.org/issues/5065?journal_id=195322011-07-22T17:19:54Ztechnohippy (Yasushi ANDO)andyjpn@gmail.com
<ul></ul><p>The same kinds of requests as "endall" are being discussed on <a class="issue tracker-2 status-6 priority-4 priority-default closed" title="Feature: Compress a sequence of ends (Rejected)" href="https://redmine.ruby-lang.org/issues/5054">#5054</a> which is set to Joke. So "endall" can be a joke. In the case of "{", the issue below is a bit similar to your's and has been already rejected:<br>
<a href="http://redmine.ruby-lang.org/issues/729" class="external">http://redmine.ruby-lang.org/issues/729</a></p>
<p>No offense is meant but you may recognize "Category set to Joke" as almost rejection.</p> Ruby master - Feature #5065: Allow "}" as an alternative to "end"https://redmine.ruby-lang.org/issues/5065?journal_id=196072011-07-24T13:47:12Zlazaridis.com (Lazaridis Ilias)ilias@lazaridis.com
<ul></ul><p>Yasushi ANDO wrote:</p>
<blockquote>
<p>The same kinds of requests as "endall" are being discussed on <a class="issue tracker-2 status-6 priority-4 priority-default closed" title="Feature: Compress a sequence of ends (Rejected)" href="https://redmine.ruby-lang.org/issues/5054">#5054</a> which is set to Joke. So "endall" can be a joke.</p>
</blockquote>
<p>I do not make jokes on a issue-tracking-system of a programming language (I made them on the user-lists, like I made some on ruby-talk).</p>
<p>(btw: generally, if you want to keep "joke", than it should be a "Tracker" (issue-type) Or possibly "status: joking" - But not an component-type.</p>
<blockquote>
<p>In the case of "{", the issue below is a bit similar to your's and has been already rejected:<br>
<a href="http://redmine.ruby-lang.org/issues/729" class="external">http://redmine.ruby-lang.org/issues/729</a></p>
</blockquote>
<p>It's similar, yes, but not the same.</p>
<blockquote>
<p>No offense is meant but you may recognize "Category set to Joke" as almost rejection.</p>
</blockquote>
<p>I did not take any offence. What I finally care about is the efficiency of this project.</p>
<p>But "Jokes" do not belong here. Analysing and understanding issues is difficult enough, and something that looks like a joke can be very serious.</p>
<p>E.g., sometimes you have to realize that a proposal you made was a "joke", in order to move on to a more serious proposal.</p>
<p>Mr. Prescott's (serious) comment was correct, and reminded me that "}" is expected to appear paired to an "{".</p>
<p>So, instead of "}", there could be another shortform "end", possibly just an "e" (enables e;e;e;e;e)</p>
<p>There is and issue with "end", at least with the multiple ends (that's why I would not see an "endall" as a joke)</p>
<ul>
<li>
</ul>
<p>So, I realize that the initial proposal is finally a "joke", you can reject this issue.</p>
<p>Or you can leave it open and change the title to:</p>
<p>Provide a shorter alias for "end" (e.g.: "e")</p>
<p>(if this is to be rejected, too, no problem)</p> Ruby master - Feature #5065: Allow "}" as an alternative to "end"https://redmine.ruby-lang.org/issues/5065?journal_id=196142011-07-24T22:50:32Zlazaridis.com (Lazaridis Ilias)ilias@lazaridis.com
<ul></ul><p>Yasushi ANDO wrote:<br>
[...]</p>
<blockquote>
<p>No offense is meant but you may recognize "Category set to Joke" as almost rejection.</p>
</blockquote>
<p>Then make it "Status: Joke?".</p> Ruby master - Feature #5065: Allow "}" as an alternative to "end"https://redmine.ruby-lang.org/issues/5065?journal_id=214192011-10-19T17:46:30Ztechnohippy (Yasushi ANDO)andyjpn@gmail.com
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Rejected</i></li></ul><p>Rejected because there's no discussion about this issue for three months.</p> Ruby master - Feature #5065: Allow "}" as an alternative to "end"https://redmine.ruby-lang.org/issues/5065?journal_id=848532020-04-01T02:33:45Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/16746">Feature #16746</a>: Endless method definition</i> added</li></ul> Ruby master - Feature #5065: Allow "}" as an alternative to "end"https://redmine.ruby-lang.org/issues/5065?journal_id=849372020-04-06T02:58:50Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/84937/diff?detail_id=56787">diff</a>)</li></ul>