Skip to content

v1.13.0

Compare
Choose a tag to compare
@sharkdp sharkdp released this 09 Aug 15:48
· 312 commits to master since this release

Overview

This is probably the largest release since the initial version of Numbat. The type checker has been rewritten completely and we now have full type inference in Numbat. You can read more about it here and in #443. This new type system also made it possible to add lists to the language. You can read more here and here. Another major feature is the possibility to add local variables in function definitions (by @irevoire). You can read more in #519 and #201.

One example to sum up the features in this new release is the following function:

fn breaking_distance(v) = v t_reaction + v² / 2 µ g0
  where t_reaction = 1 s # driver reaction time
    and µ = 0.7          # coefficient of friction

If you enter this function in the Numbat interpreter (try here), the new type inference engine will fill in all types:

fn breaking_distance(v: Velocity) -> Length = v × t_reaction + (v² / (2 µ × g0))
  where t_reaction: Time = 1 second
    and µ: Scalar = 0.7

Features

Changes

  • Change postfix apply operator from // to |> by @sharkdp in #520
  • Change quadratic_equation to return a list of solutions by @sharkdp in #450
  • Better error message for empty string interpolations by @sharkdp in #474

Bugfixes

Misc

Units

New Contributors

Full Changelog: v1.12.0...v1.13.0