pyvm: split op handlers into ops_core/ops_box/ops_ctrl; add ops_flow + intrinsic; delegate vm.py without behavior change

net-plugin: modularize constants (consts.rs) and sockets (sockets.rs); remove legacy commented socket code; fix unused imports
mir: move instruction unit tests to tests/mir_instruction_unit.rs (file lean-up); no semantic changes
runner/pyvm: ensure using pre-strip; misc docs updates

Build: cargo build ok; legacy cfg warnings remain as before
This commit is contained in:
Selfhosting Dev
2025-09-21 08:53:00 +09:00
parent ee17cfd979
commit c8063c9e41
247 changed files with 10187 additions and 23124 deletions

View File

@ -0,0 +1,26 @@
# Nyash vs Other Languages — Feature Comparison
Perspective
- Nyash emphasizes a unified Box model, hygienic AST macros with sandboxing, and multibackend execution (PyVM/LLVM/Cranelift/WASM).
Axes
- Control Flow & SSA
- Nyash: explicit observability (hints), PHI hygiene invariants.
- Rust/Swift/Kotlin: SSA is internal; limited direct observability.
- Exceptions
- Nyash: postfix `catch/cleanup` (scopefirst), zerocost lowering.
- Rust: Result/? idiom (no exceptions). Swift/Kotlin: try/catch/finally.
- Macros
- Nyash: AST JSON v0, hygienic by construction, isolated child with capabilities.
- C: text macro. Rust: macro_rules!/procmacros. Lisp/Julia: homoiconic AST.
- Scope
- Nyash: ScopeBox (compiletime metadata) and ScopeEnter/Leave hints; disappears at runtime.
- Go/Rust/Swift: lexical scopes (no explicit observability layer).
- Backends
- Nyash: PyVM (reference semantics), LLVM (AOT), Cranelift (JIT), WASM.
- Others: single backend or VM.
Takeaways
- Nyashs differentiator is “observability without cost” and macro safety by default.
- Where tradeoffs exist (e.g., temporary hygiene valves), theyre gated and documented.