by bentheklutz · 4y ago · 0 comments
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.