チャットパレットにおいてコメントアウト記法を追加#167
Open
ViVi-shark wants to merge 1 commit into
Open
Conversation
e6ec3aa to
67480c7
Compare
38e4bc0 to
1d41285
Compare
07d19c3 to
4510de2
Compare
1558afb to
6280311
Compare
2651883 to
b232a52
Compare
dc377bb to
4d43f79
Compare
1028a71 to
361f29c
Compare
58c92f3 to
6ef632f
Compare
93cf97d to
99541ff
Compare
2223312 to
fb39671
Compare
50e5321 to
88d68a0
Compare
7d69805 to
613db4e
Compare
9b9cf95 to
af5fa97
Compare
694b0a7 to
3e03ddf
Compare
e159168 to
6e02b4d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#156 より復旧
機能
チャットパレットにおけるコメントアウト記法
記法
行頭を
;にする挙動
当該行が存在しないかのようにチャットパレットを出力する
想定用途
“チャットパレットにあるとわずらわしい気がするが、削除していいと断言できるほどでもない”ものを一時的に除去するためにもちいる。
例:「キャラクターの成長にともなって、より上位の能力を手に入れたため、下位の能力用のコマンドはもう使わないような気がする……が、(消費コスト等の都合から)もしかすると使うことになるかもしれない……」というような場合
あるいは、セッションごとに ON/OFF するような使い方もできるかもしれない。
(ダンジョン攻略用の能力のコマンドは、ダンジョンの関与しないシナリオには不要……みたいなケース)
議論
記法
記法がこれでよいのかには議論の余地がある。
一般的に、単一行のコメントアウトは、行頭に
#や//や;を置くという記法が採用されている。それぞれについての検討は以下:#以下の点から誤判定の可能性が想定される(ないしは、すくなくともまぎらわしい)ため、不適当と思われる。
###と重複してしまう#がコマンドに含まれることはままある(たとえば BCDice においては、#を含みうるコマンドが多数ある)//ゆとシの複数行記述欄におけるコメントアウト記法と一致しており、一貫性はある、が……。
チャットパレット上では、ゆとチャを含む主要なセッションツール全般において、変数定義の記法に採用されており、採用できない。
;セミコロン
;によるコメントアウトは、 .vimrc や php.ini に倣ったもの。主要なダイスボットやセッションツールにおいて、すくなくとも行頭にセミコロンを置くようなコマンドは思い当たらない。
一般的な用法においても、行頭にセミコロンを置くケースはまずないと考えられる。
備考
どこかにこの記法についての説明を載せるべきだと思うが、チャットパレット周辺のUIのどこにねじ込んでもいまいち目立たない気がしたので、とりあえずPR時点ではどこにも書いていない。