Date: 2026-07-06
This document turns outside advice about competing with C++ and Rust into Hum engineering commitments.
The advice is useful because it names the classic systems-language cliffs: memory management, LLVM/backend work, self-hosting timing, C interop, compiler front-end design, and compile-time pressure.
It is incomplete because it treats language design mostly as syntax plus LLVM. Hum's real bet is larger: checked intent, explicit effects, cost promises, security contracts, semantic tooling, and agent-readable compiler facts.
The advice helps, but it should not steer Hum into building a generic Rust/Zig clone.
It confirms these decisions:
- keep the bootstrap compiler in Rust for a long time
- do not self-host early
- do not build machine-code backends before the front end is trustworthy
- treat C FFI as a survival requirement
- treat memory safety as the core design decision
- treat compile time as a first-class product feature
It does not answer Hum's hard questions:
- how source code carries intent without becoming prose
- how the compiler checks promises instead of merely parsing comments
- how agents consume structured meaning instead of guessing from text
- how cost, allocation, effects, and security claims become enforceable
- how beginners read systems code without hiding systems truth
Hum cannot compete with Rust by being casual about memory.
Decision:
- Hum defaults to Rust-style ownership, borrowing, moves, and exclusive mutation.
- Hum adds clearer source-level intent with
uses:,changes:,needs:,ensures:,protects:, andcost:. - Hum should support explicit regions, arenas, and allocator parameters where they make systems code clearer.
- Reference counting may exist as a library type, but it is not the default memory model.
- Garbage collection is not the systems baseline.
Hard rule:
Hum does not get to say "safer than Rust" until the ownership/effect checker can reject real memory, aliasing, lifetime, and data-race bugs.
LLVM is a strong backend path, especially for optimized native code, object files, debug information, and many target architectures.
Decision:
- Hum should eventually lower to LLVM for optimized AOT builds.
- Hum may use Cranelift or an interpreter earlier for fast feedback and a simpler executable core.
- Hum IR must come before LLVM IR so intent, effects, contracts, source spans, and semantic graph identity are not thrown away too early.
Hard rule:
Do not start by writing LLVM codegen. Start by proving the front end can parse, validate, explain, and serialize meaning.
A self-hosted compiler is a milestone, not proof of a good language.
Decision:
- Rust remains the stage0 compiler implementation language.
- Hum starts self-hosting only with leaf tools and non-critical compiler pieces.
- The parser, checker, borrow/effect checker, optimizer, and backend stay in Rust until Hum versions are simpler, tested, fuzzed, and differentially checked.
Hard rule:
Self-hosting cannot slow down diagnostics, safety work, or beginner tooling.
Systems programmers live near C ABIs, OS APIs, drivers, runtimes, databases, graphics libraries, and embedded SDKs.
Decision:
- Hum needs explicit
foreignblocks. - Foreign calls must declare ABI, layout, ownership transfer, failure behavior, trust boundary, and safety obligations.
- The first stable foreign target should be C. C++ interop is a separate layer because C++ ABI, templates, exceptions, and ownership conventions are much messier.
Hard rule:
No foreign function is "just a call". It is a trust boundary.
Parser generators can help, but Hum's first parser should optimize for clear errors, spans, recovery, and semantic graph construction.
Decision:
- The Rust bootstrap can keep a hand-written parser while syntax is fluid.
- Tree-sitter should exist for editors and incremental syntax trees.
- The compiler parser remains authoritative for semantics.
Hard rule:
If a syntax feature makes error recovery, highlighting, LSP, or agent repair bad, it does not stabilize.
A language for beginners and systems engineers lives or dies on errors.
Hum diagnostics need stable codes, blame blocks, suggested fixes, JSON output, LSP mapping, related contracts, and examples.
A Rust competitor without a Cargo-class experience is not a Rust competitor.
Nectar must be boring, reproducible, fast, and security-aware from the start.
Syntax highlighting, semantic tokens, formatting, LSP, debugger source maps, profiler links, and agent repair all need stable node identities.
Hum should reject clever syntax that tools cannot explain.
Hum's standard library should not be a pile of wrappers.
It needs benchmarked containers, allocation visibility, adversarial tests, property tests, fuzzing, cache-aware layouts, and clear cost contracts.
Memory safety is not all of security.
Hum also needs secret types, capability boundaries, constant-time claims, package trust, unsafe review rules, FFI auditability, sanitizer hooks, and supply-chain policy.
Hum cannot win by being theoretically better.
It needs:
- C interop
- Rust interop plan
- great docs
- small examples
- editor support
- build system stability
- real benchmark honesty
- a few killer libraries or domains
Hybrid, but with a clear default:
owned values by default
borrow for shared read access
change borrow for exclusive mutation
regions and arenas when declared
reference counting as an explicit type
unsafe only inside reviewed, contract-heavy boundaries
Hum should feel less mysterious than Rust, but it should not throw away Rust's core safety lesson.
Hum's target flaw is not one syntax wart.
The target flaw is that most languages hide senior-engineer reasoning in comments, naming conventions, review culture, tests, benchmarks, and tribal knowledge.
Hum moves that reasoning into checked source:
why:
uses:
changes:
needs:
ensures:
protects:
watch for:
cost:
tests:
does:
That is the wedge. If this does not work, Hum is just another syntax experiment.
Both, but in different modes.
Default developer loop:
- parse fast
- type/effect check fast
- emit semantic graph fast
- run targeted tests fast
- keep editor feedback under strict budgets
Release loop:
- optimize deeply
- use profile-guided data where available
- prove or benchmark declared cost claims
- emit full debug/profiling/source-map metadata
Hard rule:
Hum should never make every edit pay for every possible optimization.
Mitigation:
Milestone 0 stays focused on parsing, diagnostics, semantic graph, and intent checks.
Mitigation:
Every promise has a level:
noted
warned
checked
proved
benchmarked
Docs must not blur those levels.
Mitigation:
Every feature must improve at least one of:
- human readability
- machine-checkable intent
- agent repair accuracy
- safety clarity
- performance visibility
- tooling quality
Mitigation:
Foreign and unsafe blocks require contracts, proofs or tests, trust notes, and small scopes.
Mitigation:
Semantic graph caching, incremental checks, feature budgets, no hidden macro explosions, and separate fast-check versus optimized-build modes.
Mitigation:
Beginner examples, systems examples, Rust/C++ migration examples, editor tests, error-message tests, and usability reviews must be release gates.
docs/DIAGNOSTICS.mdmust be written before more syntax expansion.docs/FFI_AND_ABI.mdmust define C interop before native backend work.docs/UNSAFE_POLICY.mdmust exist before any unsafe syntax stabilizes.docs/PACKAGE_AND_BUILD.mdmust make Nectar a first-class language pillar.docs/LSP_AND_DEBUG_PROTOCOLS.mdmust define stable node identities before syntax freezes.- The Rust bootstrap remains the trusted compiler until Hum earns self-hosting.
- LLVM is an optimized backend target, not the starting point.
The advice is a good warning label.
Hum's response is not to get smaller in ambition. It is to get stricter about proof.
A serious Hum claim must always answer:
What does the human read?
What does the compiler check?
What does the toolchain expose?
What can the agent repair?
What can the machine prove or measure?