Skip to content

v0.5.0

Compare
Choose a tag to compare
@faultyserver faultyserver released this 01 Mar 15:47
· 103 commits to master since this release
272781e

Myst 0.5.0 has many smaller improvements, but by far the biggest addition in this release is inheritance. Just like type restrictions for method parameters, types can use the same syntax to define their supertype (the type they inherit from). With the addition of type inheritance, the standard library has had some re-writes to make use of it. Namely, IO is now a type with subtypes of IO.FileDescriptor and the new TCPSocket, and File inherits from IO.FileDescriptor.

Another major feature is the new "Semantic Analysis" phase, which is responsible for making more complex assertions about a program than the parser is capable of. For now, the only assertion it makes is multiple binding of method parameters, but this will continue to be expanded in future releases.

Lots of bug fixes, general stability improvements, and better usability in the standard library are all also featured in this release.

This release will not be published to the homebrew tap. A new, custom release manager is in the works (similar to rbenv) that will be replacing the homebrew releases. This will also be cross-platform and work for Linux users. Sorry for the inconvenience, but brew has just proven to be overly cumbersome and insufficient for what Myst needs.

Additions / Changes

  • Many new methods for String (see #138. Thanks, @Jens0512).
  • New "semantic analysis" phase (see #145).
  • Naming a variable multiple times in a method parameter raises a semantic-time error (see #145).
  • Type restrictions now also check the ancestry of a Type/Module for matches (see #143).
  • Type inheritance is now supported with a syntax similar to type restrictions (see #142).
  • Re-implemented IO as a Type, and added FileDescriptor as a base for File (see #158).
  • Spec failures now include the name path of the spec that failed (see #161. Thanks, @Jens0512).
  • Added sleep as a top-level method (see #162. Thanks, @Jens0512).
  • Type Paths (e.g., Foo.Bar) can now be used directly in instantiations (see #164).
  • Primitive types are now implemented directly as Crystal's native types (see #166).
  • Added a basic TCPSocket implementation for network communication (see #167).

Bug Fixes

  • Fixed a potential error leak with Myst::VM#reset (see #137. Thanks, @Jens0512).
  • Functions can no longer override existing variables in the current scope (see #144).
  • while and until now actually do the looping thing they're supposed to (see #159).
  • scopes and self values are now properly popped when leaving an Invocation (see #160).
  • The callstack is now properly managed throughout the interpreter (see #163).

Infrastructure

  • Add help make rule to show all available make commands (see #147. Thanks, @Jens0512).