Skip to content

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 operator
  • int? — optional type syntax sugar
  • wyn test — cross-platform test runner (no shell required)
  • wyn fmt — code formatter with --check for 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 }

println(Color.Red.to_string())   // "Red" (was "0" in v1.10)

var c = Color.Green
println(c.to_string())           // "Green"

Indexed Iteration

wyn
var fruits = ["apple", "banana", "cherry"]
for i, v in fruits {
    println(i.to_string() + ": " + v)
}
// 0: apple
// 1: banana
// 2: cherry

String Repeat

wyn
println("ha" * 3)       // "hahaha"
println("-" * 40)        // separator line

Optional Type Syntax

wyn
var x: int? = OptionInt_Some(42)
var y: int? = OptionInt_None()
println(OptionInt_unwrap(x).to_string())  // 42

Compiler 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 string

Typed Arrays

var arr: [int] = [] now uses a specialized WynIntArray with raw long long* storage — no type tags, no boxing. Sum of 1M ints is 2x faster.

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 unformatted

Style: 4-space indent, no semicolons, braces on same line.

Metrics

Metricv1.10v1.11
Unit tests110110
BDD tests3236
Binary size49KB49KB
fib(35)33ms34ms
Official packages3136

Upgrading

bash
curl -fsSL https://wynlang.com/install.sh | sh
wyn --version  # should show 1.11.0

No 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 return statement.
  • enum.to_string() now returns the variant name instead of the integer value. If you relied on the integer string, use int_to_string() directly.

Previous Releases

MIT License