docs: update documentation to reflect actual implementation status
Many features were documented as "missing" or "planned" but are actually working: generics, string interpolation, File/HTTP/Random/Time effects, JSON parsing, module system, and JIT CLI integration. Updated IMPLEMENTATION_PLAN.md, OVERVIEW.md with accurate status. Added ROADMAP.md (use-case-targeted) and LANGUAGE_COMPARISON.md. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
102
docs/OVERVIEW.md
102
docs/OVERVIEW.md
@@ -111,12 +111,51 @@ toString(42) // "42"
|
||||
typeOf([1, 2, 3]) // "List"
|
||||
```
|
||||
|
||||
### Planned (Not Yet Implemented)
|
||||
### Also Working
|
||||
|
||||
- **Schema Evolution**: Versioned types with automatic migrations
|
||||
- **Behavioral Types**: Properties like `is pure`, `is idempotent`
|
||||
- **Modules/Imports**: Code organization
|
||||
- **Compilation**: Currently interpreter-only
|
||||
```lux
|
||||
// Generic type parameters
|
||||
fn map<T, U>(f: fn(T): U, list: List<T>): List<U> = ...
|
||||
fn identity<T>(x: T): T = x
|
||||
|
||||
// String interpolation
|
||||
let name = "Alice"
|
||||
Console.print("Hello, {name}!") // Hello, Alice!
|
||||
Console.print("1 + 2 = {1 + 2}") // 1 + 2 = 3
|
||||
|
||||
// File effects
|
||||
let content = File.read("config.txt")
|
||||
File.write("output.txt", "Hello!")
|
||||
let exists = File.exists("file.lux")
|
||||
|
||||
// HTTP effects
|
||||
let response = Http.get("https://api.example.com/data")
|
||||
Http.post("https://api.example.com/submit", "{\"key\": \"value\"}")
|
||||
|
||||
// Random effects
|
||||
let n = Random.int(1, 100)
|
||||
let coin = Random.bool()
|
||||
|
||||
// Time effects
|
||||
let now = Time.now()
|
||||
Time.sleep(1000) // milliseconds
|
||||
|
||||
// JSON parsing
|
||||
let obj = Json.parse("{\"name\": \"Alice\"}")
|
||||
let str = Json.stringify(obj)
|
||||
|
||||
// Module system
|
||||
import mymodule
|
||||
import utils/helpers as h
|
||||
import math.{sqrt, abs}
|
||||
import prelude.*
|
||||
```
|
||||
|
||||
### Planned (Not Yet Fully Implemented)
|
||||
|
||||
- **Schema Evolution**: Parsing works (`@v1`, `from @v1`), type system integration missing
|
||||
- **Behavioral Types**: Parsing works (`is pure`, `is total`), verification beyond `pure` missing
|
||||
- **Full Compilation**: JIT works for numeric code, strings/lists/ADTs missing
|
||||
|
||||
---
|
||||
|
||||
@@ -168,12 +207,10 @@ Quick iteration with type inference and a REPL.
|
||||
|
||||
| Limitation | Description |
|
||||
|------------|-------------|
|
||||
| **Interpreter Only** | No compilation to native/JS/WASM yet |
|
||||
| **No Modules** | Can't split code across files |
|
||||
| **Limited IO** | Only Console built-in, no file/network |
|
||||
| **No Generics** | Polymorphic functions not fully implemented |
|
||||
| **Limited JIT** | Cranelift JIT works for numeric code only |
|
||||
| **No Package Manager** | Can't share/publish packages yet |
|
||||
| **New Paradigm** | Effects require learning new concepts |
|
||||
| **Small Ecosystem** | No packages, libraries, or community |
|
||||
| **Small Ecosystem** | No community packages yet |
|
||||
| **Early Stage** | Bugs likely, features incomplete |
|
||||
|
||||
---
|
||||
@@ -232,10 +269,9 @@ Quick iteration with type inference and a REPL.
|
||||
|
||||
### Not a Good Fit (Yet)
|
||||
|
||||
- Production applications (too early)
|
||||
- Performance-critical code (interpreter)
|
||||
- Large codebases (no modules)
|
||||
- Web development (no JS compilation)
|
||||
- Large production applications (early stage)
|
||||
- Performance-critical code (JIT limited to numeric)
|
||||
- Web frontend development (no JS compilation)
|
||||
- Systems programming (no low-level control)
|
||||
|
||||
---
|
||||
@@ -282,20 +318,36 @@ Source Code
|
||||
│ Type Checker│ → Typed AST + Effect Tracking
|
||||
└─────────────┘
|
||||
│
|
||||
▼
|
||||
┌─────────────┐
|
||||
│ Interpreter │ → Values + Effect Handling
|
||||
└─────────────┘
|
||||
├─────────────────────────┐
|
||||
▼ ▼
|
||||
┌─────────────┐ ┌──────────────┐
|
||||
│ Interpreter │ │ JIT Compiler │
|
||||
│ (default) │ │ (Cranelift) │
|
||||
└─────────────┘ └──────────────┘
|
||||
│ │
|
||||
▼ ▼
|
||||
Values + Effects Native Code
|
||||
(~160x speedup)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Future Roadmap
|
||||
|
||||
1. **Standard Library** - List, String, Option utilities
|
||||
2. **Module System** - Import/export, namespaces
|
||||
3. **JavaScript Backend** - Run in browsers
|
||||
4. **Schema Evolution** - Versioned types
|
||||
5. **Behavioral Types** - is pure, is idempotent
|
||||
6. **LSP Server** - IDE support
|
||||
7. **Package Manager** - Share code
|
||||
**Complete:**
|
||||
- ✅ Standard Library (List, String, Option, Result, JSON)
|
||||
- ✅ Module System (imports, exports, aliases)
|
||||
- ✅ LSP Server (basic diagnostics, hover, completions)
|
||||
- ✅ Generics and String Interpolation
|
||||
- ✅ File/HTTP/Random/Time Effects
|
||||
|
||||
**In Progress:**
|
||||
1. **Behavioral Type Verification** - Total, idempotent, deterministic checking
|
||||
2. **Schema Evolution** - Type system integration, auto-migration
|
||||
3. **Error Message Quality** - Elm-style suggestions
|
||||
|
||||
**Planned:**
|
||||
4. **HTTP Server Effect** - Build web APIs
|
||||
5. **SQL Effect** - Database access
|
||||
6. **Package Manager** - Share code
|
||||
7. **JavaScript Backend** - Run in browsers
|
||||
|
||||
Reference in New Issue
Block a user