Syntax freeze
Surface syntax is frozen: >>/>>>, #path, control-flow symbols, struct@ / name#. There is no user-facing Result / Ok / Err / ?.
| Topic | Frozen | Not doing |
|---|---|---|
| Errors | >> expr + >>> (err) {}; >>> rethrows | user Result / two-result returns |
| Exits | << return, <<< exit, -> continue, <- break | return / break / continue / exit keywords |
| import | #errors, #xu/ast; alias json #encoding/json | import "…" |
| Integers | int = i64; i32/u32/u8/byte are distinct; no implicit widen; wrap | same-slot aliases |
| Strings | double quotes are the literal | single-quoted strings |
| Low-Level & Baremetal | unsafe { … } block isolation, raw pointer *raw T, asm!(…) inline assembly, volatile_read / volatile_write | manual lifetime annotation hell in application code / implicit raw dereference |
| Layout & Attributes | @repr("C", align: N), @repr("C", packed); #[no_mangle], #[naked], #[panic_handler], #[section("…")] | unpredictable automatic struct field padding & reordering |
| Freestanding Tag | Header $freestanding or xu.xun profile: freestanding severs host OS & libc dependencies | rigid coupling to host OS runtime |
any / temp are runtime boxes; # / @ / struct@ are compile-time splits. Unconstrained form is bare name# / name@, not name# any.
오류 구문 마이그레이션 (0.15.0)
Xu 0.15.0에서는 레거시 or 오류 구문(or (err) { } 및 or >>)이 제거되었습니다. 해당 레거시 형태를 사용하면 이제 하드 파서 오류가 발생하며 >>> (err) { }(처리) 및 >>>(전파)를 사용하도록 안내합니다(>> expr는 오류를 던짐). or는 더 이상 예약어가 아닌 일반 식별자이며(불리언 OR는 계속 ||), 에디터에서는 xu-lsp가 레거시 or 핸들러를 >>>로 바꾸는 빠른 수정(quick-fix) 코드 액션을 제공합니다. VS Code / Cursor LSP 코드 액션을 참고하세요.