docs: sync README and plans with v0.5.x features

Document multi-instance closures, tuples, Iter HOF, diagnostics, and
updated test targets. Refresh QUALITY_PLAN diagnosis and next-day backlog.
This commit is contained in:
2026-07-15 16:16:54 +03:00
parent f1896183f5
commit e805af6ef6
4 changed files with 89 additions and 21 deletions
+8
View File
@@ -129,12 +129,20 @@ Use `--target <triple>` to cross-compile for a different platform. Bux generates
## Running Tests
### Example suite
```bash
make test-examples # all examples/ programs (40+)
make test-errors # golden Rust-style diagnostic output
```
### Compiler Tests
```bash
make test
```
This runs:
- Example suite (`test-examples`)
- Error diagnostic goldens (`test-errors`)
- Lexer unit tests
- Parser unit tests
- Semantic analysis unit tests
+12 -11
View File
@@ -1,7 +1,7 @@
# Bux — План към „добър“ език (v0.5 → v1.0)
> **Дата:** 2026-07-15
> **Текущо:** v0.5.0 — selfhost loop, gradual ownership, green threads, 26+ examples ✅
> **Дата:** 2026-07-15 (обновено вечерта)
> **Текущо:** v0.5.x — selfhost loop, gradual ownership, green threads, **40+ examples**
> **Цел:** Език, с който се пишат реални проекти комфортно, безопасно (по избор) и с надежден toolchain.
---
@@ -12,14 +12,14 @@
|------|-----------|--------|
| Frontend (lex/parse) | Пълен Pratt parser, recovery | ★★★★☆ |
| Sema / generics | Monomorphization, trait bounds basic | ★★★★☆ |
| HIR → C | Работи; tuples/func-ptr half-baked в bootstrap | ★★★☆ |
| Selfhost (`src/`) | ~12k LOC, binary-identical loop | ★★★★★ |
| HIR → C | Tuples + fat `func` ABI в bootstrap **и** selfhost | ★★★☆ |
| Selfhost (`src/`) | ~12k LOC, binary-identical loop, closures+tuples | ★★★★★ |
| Gradual ownership | `@[Checked]`, `&`/`&mut`, move, Drop | ★★★☆☆ (basic) |
| Concurrency | M:N tasks + channels + async | ★★★★☆ |
| Stdlib | 25+ модула, но колекциите са минимални | ★★★☆ |
| Tooling | `new/build/run/test/fmt`, LSP prototype, VSCode | ★★☆☆ |
| Stdlib | Array/Map/Set/String/Iter HOF разширени | ★★★☆ |
| Tooling | `test-errors`, LSP diagnostics via `buxc check` | ★★☆☆ |
| Ecosystem / registry | path+git deps; няма централен registry | ★☆☆☆☆ |
| Документация | Има, но drift (PLAN vs README версии) | ★★★☆ |
| Документация | README + QUALITY_PLAN синхронизирани (2026-07-15) | ★★★☆ |
**Силна ниша:** gradual ownership (C-скорост на писане + opt-in Rust-safety).
**Слабо място:** ergonomics на stdlib + maturity на tooling + пълнота на borrow checker.
@@ -40,7 +40,7 @@
## Фази
### A — Ergonomics & Stdlib (P0, сега) 🔄
### A — Ergonomics & Stdlib (P0) ✅ (core done)
| # | Задача | Защо | Статус |
|---|--------|------|--------|
@@ -57,10 +57,11 @@
|---|--------|------|--------|
| B.1 | Proper tuple types в C backend | `(T,U)``Tuple_T_U` struct + `.0`/`.1` | ✅ bootstrap + selfhost |
| B.2 | Function pointer types | `func(T)->U` fat ABI | ✅ bootstrap + selfhost |
| B.3 | Match expression до край в C (не `return "0"`) | Expression-context match |
| B.4 | Closures: multi-instance + loop/return в body | Реални higher-order callbacks |
| B.3 | Match expression до край в C (не `return "0"`) | Expression-context match | ⏳ |
| B.4 | Closures multi-instance | Fat `BuxFn` + heap env | ✅ bootstrap + selfhost |
| B.4b | Closures: loop/return edge cases in body | По-сложни body control-flow | ⏳ |
| B.5 | По-добри diagnostics (snippet + hint) | DX #1 за нови потребители | ✅ |
| B.6 | Bootstrap ↔ selfhost feature parity | Operator overloading, string interp и в selfhost |
| B.6 | Bootstrap ↔ selfhost feature parity | Tuples/closures done; string interp / ops still bootstrap-heavy | 🔄 |
### C — Gradual Ownership 2.0 (P1)
+2 -1
View File
@@ -1,6 +1,7 @@
# Bux Language Roadmap — New Constructs
> **Updated:** 2026-06-09 | **Status:** In Progress
> **Updated:** 2026-07-15 | **Status:** In Progress
> Recent: multi-instance closures (fat `BuxFn`), tuples in selfhost, Iter map/filter/fold, Rust-style diagnostics.
This document tracks planned language constructs beyond Phase 8 strategy.