逻辑运算
语法
当前包括:
&&||!
语义
逻辑运算主要面向 bool,其中 && / || 通常带短路语义。
Usage
if is_ready() && has_data() {
consume()
} else {
wait_more()
}
注释:这里 && 依赖短路语义,只有左侧为真时才继续求值右侧条件。
边界
需要单独明确:
- 是否允许 overload
- 短路语义是否固定不可重载
这里集中展示 CHIBA level-1 specification,覆盖 core language、control flow、memory、patterns、IR lowering 与 package system 等实现边界。
The docs surface keeps CHIBA level-1 specification pages browsable inside the site, with direct paths into language, control flow, memory, pattern, and lowering rules.
当前包括:
&&||!逻辑运算主要面向 bool,其中 && / || 通常带短路语义。
if is_ready() && has_data() {
consume()
} else {
wait_more()
}
注释:这里 && 依赖短路语义,只有左侧为真时才继续求值右侧条件。
需要单独明确: