What's New in v1.11
"The Developer Experience Release" - make developers productive in their first hour.
Highlights
enum.to_string()returns"Red", not"0"for i, v in arr- indexed iteration like Python and Go"ha" * 3- string repeat operatorint?- optional type syntax sugarwyn test- cross-platform test runner (no shell required)wyn fmt- code formatter with--checkfor CI- Missing return is now an error - no more silent garbage values
- Type errors from Wyn - clear messages with line numbers, not cryptic C errors
Language Features
Enum to_string
wyn
enum Color { Red, Green, Blue }
print(Color.Red.to_string()) // "Red" (was "0" in v1.10)
var c = Color.Green
print(c.to_string()) // "Green"Indexed Iteration
wyn
var fruits = ["apple", "banana", "cherry"]
for i, v in fruits {
print(i.to_string() + ": " + v)
}
// 0: apple
// 1: banana
// 2: cherryString Repeat
wyn
print("ha" * 3) // "hahaha"
print("-" * 40) // separator lineOptional Type Syntax
wyn
var x: int? = OptionInt_Some(42)
var y: int? = OptionInt_None()
print(OptionInt_unwrap(x).to_string()) // 42Compiler Improvements
Missing Return is an Error
wyn
fn get() -> int {
// v1.10: Warning (returns garbage at runtime)
// v1.11: Error - compilation fails
}Type Mismatch Errors from Wyn
wyn
var x: int = "hello"
// Error: Type mismatch at line 1
// Expected: int (integer)
// Got: string (text string)
// Suggestion: use .to_int() to parse the stringTyped Arrays
var arr: [int] = [] now uses a specialized WynIntArray with raw long long* storage - no type tags, no boxing. Building and summing a 1M-element int array takes ~11ms.
Tooling
wyn test
Cross-platform test runner using direct process spawning. No shell, no system() calls. Works on macOS, Linux, and Windows.
bash
$ wyn test tests/expect
🧪 Wyn Test Runner
✓ test_enums.wyn (0.1s)
✓ test_structs.wyn (0.1s)
✓ test_string_methods.wyn (0.1s)
Results: 21 passed, 0 failed (0.3s)
🎉 All tests passed!wyn fmt
bash
wyn fmt file.wyn # format in place
wyn fmt --check src/ # CI mode - exit 1 if unformattedStyle: 4-space indent, no semicolons, braces on same line.
Metrics
| Metric | v1.10 | v1.11 |
|---|---|---|
| Unit tests | 110 | 110 |
| BDD tests | 32 | 36 |
Binary size (--release) | 50KB | 50KB |
| fib(35) | 41ms | 41ms |
| Official packages | 31 | 36 |
Upgrading
bash
curl -fsSL https://wynlang.com/install.sh | sh
wyn --version # should show 1.11.0No breaking changes. All v1.10 code compiles without modification, except:
- Functions with missing returns that previously compiled with a warning will now fail. Add the missing
returnstatement. enum.to_string()now returns the variant name instead of the integer value. If you relied on the integer string, useint_to_string()directly.
Previous Releases
- What's New in v1.10 - zero leaks, faster strings
- What's New in v1.9 - generators, debugger, 36 packages