Try Install Learn Blog API Packages GitHub
Posts

Mint 0.11.0 Friday, January 8th, 2021

Mint 0.11.0 has been released!

This release focused on bug fixes, although there are some new language features.

There are 102 commits since 0.10.0 by 5 contributors.

Let’s review some highlights in this release. But don’t miss out on the rest of the release changelog which has a lot of valuable information.

Regular Expression Literal

Mint now supports regular expression literals:

Regexp.match("abbc", /ab+c/i) == true

Open Modules

Modules now can be defined in multiple places allowing to define constants and functions.

module Greeter {
  fun greet (name : String) {
    "Hello #{name}!"
  }
}

module Greeter {
  fun greetPolitely (name : String) {
    "Have a nice day Mr. #{name}!"
  }
}

This is mostly useful if you want to extend a module in the standard library (like Array ).

or operator

Added the or operator as an alias to Maybe.withDefault :

Maybe.withDefault("Hello", Maybe::Just("Value")) /* "Value" */
Maybe.withDefault("Hello", Maybe::Nothing)       /* "Hello" */

Maybe::Just("Value") or "Hello" /* "Value" */
Maybe::Nothing or "Hello"       /* "Hello" */

[] access on tuples

It is now possible to use [] on tuples:

{"Name", "Joe"}[0] == "Name"

Only literal numbers are valid since it's the only way we can only determine the type.

Bugfixes and Issues

27 bugs and issues were fixed in this release.

Next steps

Please update your Mint and report any issues. We will keep moving forward and start the development focusing on 0.12.0.


Special thanks to @Sija for continuously reviewing the pull requests and to @sokil for implementing and fixing things. 🎉