Skip to content

Known Limitations

Wyn is honest about what works and what doesn't. This page is kept up to date.

Design Decisions

  • Coroutine stack size — defaults to 8MB virtual (only ~0.3KB physical per coroutine). Configurable via WYN_CORO_STACK. Crash messages show which spawn created the coroutine.
  • Variable shadowingvar x = 1; var x = 2 is a compile error. Use different names.
  • HashMap.keys()/values() — return comma-separated strings. Use .split(",") for an array.
  • wyn check — Compile-time type checker. Catches undefined variables/functions, type mismatches, wrong argument counts, const reassignment, missing returns, unused variables, unreachable code. Some stdlib return types default to int when unrecognized — use explicit type annotations.
  • string.len() returns bytes — UTF-8 byte count, not character count. "🐉".len() is 4.
  • Division by zero — returns 0 (C behavior). Use Math.checked_add/sub/mul for safe arithmetic, or Result type for safe division.
  • Integer overflow — silent by default. Use Math.checked_add(), Math.checked_sub(), Math.checked_mul() for overflow detection.

Not Yet Implemented

  • Tuple typesfn divmod(a, b) -> (int, int) is not yet supported. Use structs instead.
  • Named argumentsconnect(host: "localhost", port: 8080) is not yet supported. Use positional arguments with default parameters: fn connect(host: string = "localhost", port: int = 8080).
  • Generic structsstruct Stack<T> is not yet supported. Generic functions work.
  • Trait boundsfn sort<T: Comparable>(arr: Array<T>) is not yet supported.
  • select syntax — use Task.select_2(ch1, ch2) API instead.

Platform Notes

  • Windows regex — Uses built-in NFA engine. Supports ERE syntax (., [], ^$, *+?, (), |, \d\w\s). No backreferences or lookahead.
  • Audio — requires SDL2_mixer. Stubs when absent.
  • Mobilesystem()/popen() return stubs on iOS/Android.
  • TCC backend — bundled for macOS ARM64. Other platforms use system gcc/clang.
  • HTTPS — uses openssl s_client via shell. Works on macOS/Linux where OpenSSL is available.

MIT License