Skip to content

Releases

Wisp v0.50.0 "Sunrise"

Choose a tag to compare

@Gui97p Gui97p released this 26 Nov 17:58

The standard library has been almost entirely rebuilt, and the language gained what it needed to be pleasant to use. This is the first version that is ready to hand to other people.

Language

  • defer that propagates an error (defer file.close()!), and for x in v! over a next() that can fail.
  • yield :label to leave a block with a value, so break is only for loops.
  • switch type with several types in one arm (case *A, *B v), and checked interface conversion ((?*T)(x)).
  • Inline formatting inside the string, "{total:08.2f}", with the spec after a colon.
  • Imports per file, dynamic interfaces with #dynamic, a reworked C interop (#symbol, #fails), and errors with messages built at run time.

Standard library

  • fmt: just print, println, fprint and fprintln, writing to any io.Writer, with Display for your own types.
  • io: Reader, Writer, buffered versions, Scanner, discard, limitReader and teeWriter.
  • conv: exact parseFloat, writing to any Writer, and text in any base. Constructors take the allocator first.
  • os: a single File API, the same on Linux and Windows.
  • strings and seq: strings.Builder, strings.split and seq.Vec.
  • New: time with Duration and Stopwatch, and rand with range(1..=6), shuffle and seeded generators.

Tooling

  • wisp test prints one line per test, status module name, without extra punctuation.
  • The language server no longer shows wrong colors after a syntax error, and no longer reports unknown types when you open standard library files.

wisp compiler toolchain

Choose a tag to compare

@Gui97p Gui97p released this 24 Nov 17:02

Wisp v0.40.0 "Dawn"

Language

  • Ranges: a..b excludes the end, a..=b includes it. Works in for, case, in and as a Range value.
  • Slicing uses ranges too: s[a..b], s[a..=b], s[..n], s[2..], s[..].
  • Methods can have their own type parameters: func (*Window w) draw<mem.Allocator A>(A allocator).

Modules

  • A folder is a module. private is per file, internal covers the whole project, public is open to all.
  • Struct fields are module-private by default.
  • Programs are found automatically: every folder with a main is one.

Tooling

  • Path dependencies, workspaces, [native] libraries and [export.x].
  • wisp update and wisp doctor, install scripts for Linux and Windows, and the toolchain bundled in the packages.
  • LSP and formatter support for all of the above.

Breaking changes

  • a..b no longer includes the end: use a..=b.
  • s[a:b] is now s[a..b].
  • shared is now internal, which means the whole project.

Wisp Compiler v0.39.0

Choose a tag to compare

@Gui97p Gui97p released this 24 Nov 11:56

Alpha version