top | item 37186869

(no title)

sizediterable | 2 years ago

These are the usual questions I seek answers to first when seeing a new programming language:

  - What does writing asynchronous code look like
  - Will it have any novel or less mainstream features, e.g.
    - Algebraic effects [1]
    - Contexts/Capabilities [2]
    - Linear types [3]
  - Is the type system sound and does it support/need type casts
  - Does the language support interfaces/traits/protocols
  - How rich are generics, e.g.
    - Explicit variance annotations on type parameters
    - Lower or upper bound constraints on type parameters
    - Higher-kinded types
  - Is structural vs nominal subtyping more prevalent
  - Does it have algebraic data types? Generalized algebraic data types?
[1] https://v2.ocaml.org/manual/effects.html

[2] https://docs.hhvm.com/hack/contexts-and-capabilities/introdu...

[3] https://austral-lang.org/linear-types

discuss

order

hongbo_zhang|2 years ago

Thanks for your interest.

Note Moonbit is a language/platform for industrial usage(not an academic language), I contributed to OCaml so that I am familiar with the good/bad parts of a type system. Its aim is to build fast and run fast, and generate the tiny Wasm output.

Type system is sound, you can take it as Rust(- some features hinder fast compilation) with GC and an emphasis on data oriented programming, so we have ADT, generics, interface and ad-hoc polymorphism. We also plan to make the pattern match more expressive with first class pattern support.

The async story is constrained by the WASM runtime, we will evolve with the Wasm proposal.

wffurr|2 years ago

I thought the raison d’être for Rust was not having a GC. If this is a garbage collected language, and requires a runtime for such, isn’t this more like Go or any JVM language?