grammar(P0): add peek expression, continue statement, and field type annotations acceptance; add sample apps and interpreter path\n\n- tokenizer: add keywords (peek, continue), tokens (=> as FatArrow, :: as DoubleColon), keep >> as Arrow\n- parser: implement peek as expression (literal patterns only, else required), add continue; accept field 'name: Type' (discard type P0)\n- interpreter: evaluate PeekExpr; add Continue control flow handling\n- apps: add peek-demo, loop-continue-demo, adjust field-decl demo; use ConsoleBox instead of env.console for interpreter backend\n- docs: CURRENT_TASK updated earlier for Phase 12.7 P0\n\nNOTE: peek arms currently single-expression (no block expr yet); VM/MIR path does not lower PeekExpr yet; use --backend interpreter for demos
This commit is contained in:
@ -0,0 +1,65 @@
|
||||
Nyash言語の分岐構文の名前について、楽しくユニークな相談です!
|
||||
|
||||
【背景】
|
||||
when構文でほぼ決定していますが、これは「ニャーの言語」なので、もっと楽しい名前も考えてみたい!
|
||||
|
||||
【現在の候補】
|
||||
1. when(現在の最有力候補)
|
||||
2. match(パターンマッチング的)
|
||||
3. pick(選ぶ)
|
||||
4. given(与えられたとき)
|
||||
5. with(〜で)
|
||||
6. upon(〜に基づいて)
|
||||
7. take(取る)
|
||||
8. test(テスト)
|
||||
9. by(〜によって)
|
||||
10. for(〜について)
|
||||
|
||||
【使用例】
|
||||
```nyash
|
||||
// 現在のwhen
|
||||
when animal {
|
||||
"dog" => bark()
|
||||
"cat" => meow()
|
||||
else => silent()
|
||||
}
|
||||
|
||||
// もし別の名前なら?
|
||||
??? animal {
|
||||
"dog" => bark()
|
||||
"cat" => meow()
|
||||
else => silent()
|
||||
}
|
||||
```
|
||||
|
||||
【質問】
|
||||
1. もっとユニークで楽しい名前の提案はありますか?
|
||||
- Nyash(猫言語)らしさ
|
||||
- Everything is Box哲学
|
||||
- 短くて覚えやすい
|
||||
- 楽しくてワクワクする
|
||||
|
||||
2. 各言語の面白い分岐構文名の例は?
|
||||
- 変わった名前
|
||||
- 独特な哲学を持つもの
|
||||
- 歴史的に面白いもの
|
||||
|
||||
3. 名前から連想される「使い心地」は?
|
||||
- whenだと「〜の時」
|
||||
- pickだと「選ぶ」
|
||||
- 他の名前だと?
|
||||
|
||||
4. 猫っぽい名前はある?
|
||||
- paw(肉球)
|
||||
- meow(鳴き声)
|
||||
- hunt(狩り)
|
||||
- など...
|
||||
|
||||
【理想】
|
||||
- 楽しくて使うたびにワクワクする
|
||||
- でも実用的で分かりやすい
|
||||
- 短い(できれば3-4文字)
|
||||
- 特に良い案がなければwhenでOK!
|
||||
|
||||
気楽に、楽しく、ユニークな提案をお聞かせください!
|
||||
「こんなの思いついたにゃ〜」という感じで!
|
||||
Reference in New Issue
Block a user