← Back to context

Comment by afavour

2 years ago

The site compares it to Rust and Go but to me the comparison is AssemblyScript. It’s also WASM-native and new with relatively little ecosystem around it. But compared to Moonbit it’s a familiar language to anyone that’s used TypeScript. So why use Moonbit over AssemblyScript?

Because Moonbit is a modern language, while AssemblyScript is carrying forward the mistakes of the past. For example, Moonbit supports pattern matching and most language constructs are expressions. AS doesn't have pattern matching and consists primarily of statements. Moonbit has algebraic data types; it's not clear to me that AS does.

There might be other differences at runtime, but it's difficult to tell from just the website.

  • > Because Moonbit is a modern language, while AssemblyScript is carrying forward the mistakes of the past.

    No language has "no mistakes".

    For instance, let's take a language like Scala, which appeared 20 years ago. Has it avoided mistakes of the past? Or lets take Rust, which appeared 8 years ago. Is it "perfect"? Same with Moonbit; it will make tradeoffs and mistakes and whatnot.

    Mistakes are not always technical in nature either. They can be mistakes in positioning, strategy, community, governance, poor documentation, etc.

I think the Rust and Go comparisons are because they’re popular languages with first class WASM support but I agree

  • Why didn't they include Zig and AsssemblyScript, then?

    • Not OP, but although Zig is pretty good, it is arguably a relatively low-level language for application development. Thinking about pointers, for example, is tiring and unnecessary for most apps.