Files
hakorune/docs/private/roadmap/phases/phase-20.18/PLAN.md

35 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## Plan — Phase 20.18Null/Void 固定Result ケース別+糖衣)
0) Null/Void の固定P0
- 言語: 予約語 `null`/`void` をリテラルとして受理
- MIR JSON v0: ConstValue に `Null`/`Void` を追加
- VM: `VMValue::Null` を追加boolean/equality/stringify 対応)
- Singletons: `NullBox`/`VoidBox` を Lazy static にto_nyash_box() で変換)
1) API 最小追加Core/GateC 実装→Hakorune VM 委譲)
- Array.try_get/1, Array.try_pop/0, Map.try_get/1
- String.to_i64/0, String.to_f64/0
2) 糖衣の受理と Loweringゼロアロケーション
- Parser: `let a?=/a!=``if let ok(..)` を受理
- Builder: `?``select(ok,value,Void)`, `!``br ok/ trap`, if-let→`br ok/else`
3) 例外タグの安定化
- E_OOB / E_EMPTY / E_NOT_FOUND / E_PARSE を固定
4) スモークoptin, quick
- try_get/try_popok/err+ `?`/`!`/if-let ok
- to_i64/to_f64ok/err
5) Gate & Docs
- Gate: `HAKO_TRY_API=1`既定OFF
- Docs: result-semanticscase-by-case/ optional-semanticslink更新/ testing-guide 補足
- Docs: vm-core に Null/Void/rc 規則を追記、phase-20.18 README/TASKS を同期
6) Plugins互換-段階更新)
- Map/Array の意味論を SSOT に揃えるget/pop 欠落→Null、push/set/clear→Void、delete→値 or Null、set の不正→Fail
- HostHandleRouter/内蔵ルーターで未更新プラグインを回避できる経路を優先Core先行
7) 後段20.19+ 任意)
- Result を“値版”へ({i1 ok, payload})。最適化の効果測定とゼロコストの検証。