4 ms·
Because Moonbit is a modern language, while AssemblyScript is carrying forward the mistakes of the past. For example, Moonbit supports pattern matching and most
by noelwelsh 3y ago
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.
- IshKebab 3y agoGo is also an old-school statement based language though.
- noelwelsh 3y agoI was responding to the question "So why use Moonbit over AssemblyScript?"
- andsoitis 3y ago> 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.
- chefandy 3y agoModern doesn't imply perfect— just that it uses recent advancements.
- coder543 3y agoIn most conversations, TypeScript generally seems to be considered a fairly "modern" language. TypeScript offers a variety of rather advanced type system features, and AssemblyScript is based on it, so by extension, AssemblyScript should be fairly "modern" too. Based on the limited docs that are available[0], Moonbit appears to be using C++-style "generics" that are just simple template substitutions (no constraints), which is far less "modern" than what TypeScript offers. Honestly, I don't think imprecise words like "modern" are particularly useful, helpful, or good for discussions like this. "Pattern matching" has been a feature of certain programming languages for decades, so is that truly a "modern" feature? [0]: https://moonbitlang.com/docs/syntax/#generics https://moonbitlang.com/docs/syntax/#generics
- chefandy 3y agoI'm not saying it's any more modern than any other language— I pointed out that being imperfect doesn't preclude modernity. Nobody even claimed it was perfect to begin with.