Version 0.4.0

This release contains the latest rewrite of the samlang backend to target LLVM instead of X86, due to Apple's switch to ARM chips.

A few more loop optimizations have been added, and all the old optimizations are done on the high-level IR instead, making the emitted JavaScript code highly optimized.

Updated Packages#

Version 0.2.0

This release refactors the project into Kotlin multiplatform build.

With some engineering, we can now generate a package that can be distributed on NPM and run in browser. Check out @dev-sam/samlang-demo.

First Beta Version

The first beta version of samlang is released. The expression level language features are mostly fixed. Future versions will try to maintain backward-compatibility with best effort.

Features considered for future versions include:

  • More visibility modifiers: package-private, internal, etc.
  • Nullable types
  • Interfaces (potentially with functors)
  • Better optimizations with interprocedural analysis

If you have any ideas on what should be included in future releases, feel free to create GitHub issues as feature requests. Please note that not all requests will be granted. For example, all requests to make samlang dynamic will be rejected, since samlang is a statically-typed language, and will remain statically-typed in the future.

class Main {
function main(): unit = println("What features do you want?")

Alpha Version 0.0.11

This update drops the support for unit literal, TS/JS/Java compilation targets, and added support for x86 assembly target support. The compiler now includes a set of optimizers that are enabled by default.

Alpha Version 0.0.10

This update changes the val expression into val statement. Read the updated docs for its usage.

Alpha Version 0.0.9

This update changes the method/function access syntax from a::b() to a.b() to be consistent with most programming language.

Now samlang will no longer error on insufficient context for type inference when a generic type cannot be inferred from context. Instead, it will treat them as int.

Finally, type query and autocompletion are implemented with the newly introduced language server. The VSCode extension will run samlang lsp to take advantage of that.

Alpha Version 0.0.8

This update introduces the support for multi-module programs and a syntax change. You can read the docs to see how to use imports.

After this change, modules are now renamed as classes, and utility module syntax support has been removed. You can simply change util to class.

Alpha Version 0.0.5

This update brings a working interpreter to the language.

The interpreter is now hosted on the demo website.

Alpha Version 0.0.2

This update changes the design of the language.

Now the syntax of the method access changes from expr.methodName to expr::methodName, and the dot syntax now means field access. Therefore, you now have two ways to access a field:

function oldWay(): int =
val { age } = this;
// shorter and cleaner in this case
function newWay(): int = this.age

Docs on the website and the test cases have been updated.