At first glance it looks a lot like Go, but you can already compile Go to WASM I believe.
In which case I'm curious what are the differences or use case vs just using Go?
In which case I'm curious what are the differences or use case vs just using Go?
But, this is not at all how go looks:
fn add(a: i32, b: i32) => i32 {
return a+b
}
It looks heavily inspired from the syntax used in rust or zig tho. (fn keyword, variable type syntax, return value)> what are the differences or use case vs just using Go?
- go has a different syntax, different keywords, different ecosystem and so on.
- go is a general purpose programming language, while wa is explicit in targeting wasm.
I don't see any special similarities more than they are c-style family languages.
fn add(a: i32, b: i32) => i32 {
return a + b;
}
vs func add(a i32, b i32) i32 {
return a + b;
}
Compare with a syntax like C, C#, or Java where you have tokens in the declaration in almost the reverse order i32 add(i32 a, i32 b) {
return a + b;
}
The two (Golang and Wa) are certainly distinct, but I would say they are closer than simply both being C-style for this particular case at least.The same is true for colons in Python: they're not really necessary but provide slighlty better readability plus syntax highlighters can get away with using regexes, I guess.