What problem does this solve?
No bitwise operations. If you need &, |, ^, <<, or >>, you're out of luck. This blocks any code that does bit manipulation: flags, binary protocols, hashing, low-level encoding.
Proposed solution
Two options:
Option A: Operators
let flags = READ | WRITE
let masked = value & 0xFF
let shifted = x << 4
Standard approach. Familiar to anyone coming from C, Rust, Python, etc.
Option B: Methods
let flags = READ.bitor(WRITE)
let masked = value.bitand(0xFF)
let shifted = x.shift_left(4)
Saves operator token budget but is more verbose. Aster already leans on methods for a lot of operations.
Worth deciding which fits the language better before implementing.
Alternatives considered
Could skip bitwise entirely and say "use FFI for low-level stuff." That's too restrictive. Bit operations come up often enough that the language should support them natively.
Area
Language syntax
What problem does this solve?
No bitwise operations. If you need
&,|,^,<<, or>>, you're out of luck. This blocks any code that does bit manipulation: flags, binary protocols, hashing, low-level encoding.Proposed solution
Two options:
Option A: Operators
Standard approach. Familiar to anyone coming from C, Rust, Python, etc.
Option B: Methods
Saves operator token budget but is more verbose. Aster already leans on methods for a lot of operations.
Worth deciding which fits the language better before implementing.
Alternatives considered
Could skip bitwise entirely and say "use FFI for low-level stuff." That's too restrictive. Bit operations come up often enough that the language should support them natively.
Area
Language syntax