ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
From: 服部- <hattorihiroaki318@gmail.com>
To: ruby-dev@ruby-lang.org
Subject: [ruby-dev:51004] Re: [Ruby master Feature#17598] 直後の改行を無視する命令(......)
Date: Sat, 30 Jan 2021 23:54:50 +0900	[thread overview]
Message-ID: <CAOGGBoP+Mv6+QW1M+hgKc5Uaeq0NAo-UbF7=eegifTp3nJZY1g@mail.gmail.com> (raw)
In-Reply-To: <redmine.journal-90179.20210130131708.2@ruby-lang.org>

[-- Attachment #1: Type: text/plain, Size: 1981 bytes --]

`......` は長過ぎると思ったので取り止めます。


(1) `--`

読みやすく書きやすい。`  --`と手前にスペースを2つが読みやすくてオススメ? (×) Ruby
では使われていないが、デクリメントが使えなくなる。(イテレータ用?)

(2) `"\\;"`

改行のエスケープと意味が分かりやすい。 `"\\\n"` と似ている。 (×)
斜めの線が入って読みにくい?単一の記号の連続の方がタイプしやすい?スクリプト言語っぽくない??

(3) `....` (4文字ドット)

見た目から意味を推測しやすい。 (×) 4文字は長い。3文字 `...` はRange や任意個の引数のようにすでに多くの記号に使われている。


この案の中では (1) が良いと思います。


2021年1月30日(土) 22:17 <nobu@ruby-lang.org>:

> Issue #17598 has been updated by nobu (Nobuyoshi Nakada).
>
> Description updated
>
> 「命令」というよりは構文要素、トークンだと思います。
>
> ----------------------------------------
> Feature #17598: 直後の改行を無視する命令(......)
> https://bugs.ruby-lang.org/issues/17598#change-90179
>
> * Author: Anonymous
> * Status: Open
> * Priority: Normal
> ----------------------------------------
> 改行を無視する命令、今 `\(\n)` となっている命令についてです。 `......` を提案します。
>
> ```ruby
> (0... ......
> 5).each ......
> .map{_1} ...... # some comments
> => ar
> # (0...5).each.map{_1} => ar
> ```
>
> (1) 本当は `...` が一番良いと思います。しかし Range で使われています。
> (2) 一番良いのが使えないなら長くしよう。 `......`
> (3) 実際に使うのなら `....` が妥当?
> (4) `....` と `......` の両方作っちゃえ。
>
> 私は実験的に (2) を希望します。
>
>
>
> --
> https://bugs.ruby-lang.org/
>

[-- Attachment #2: Type: text/html, Size: 4959 bytes --]

  reply	other threads:[~2021-01-30 14:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-17598.20210130131356.2@ruby-lang.org>
2021-01-30 13:17 ` [ruby-dev:51003] " nobu
2021-01-30 14:54   ` 服部- [this message]
2021-01-30 15:15 ` [ruby-dev:51006] " sawadatsuyoshi
2021-01-30 15:18 ` [ruby-dev:51007] " sawadatsuyoshi
2021-02-01  5:48 ` [ruby-dev:51008] " hattorihiroaki318
2021-02-03  1:13 ` [ruby-dev:51011] " nobu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOGGBoP+Mv6+QW1M+hgKc5Uaeq0NAo-UbF7=eegifTp3nJZY1g@mail.gmail.com' \
    --to=hattorihiroaki318@gmail.com \
    --cc=ruby-dev@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).