3 ms·
The difference is that if I thought the Go style is easier to read/debug I couldn't prevent you from writing it in the complex one-liner way. The go way is a l
by zalmoxes 10y ago
The difference is that if I thought the Go style is easier to read/debug I couldn't prevent you from writing it in the complex one-liner way.
The go way is a little more verbose/uglier but we are both going to do it in the same way as will the 30 other developers working on the project.
- Etzos 10y agoI don't think it's fair to say that the option Rust gives you is more complex. It's a syntactic convenience which reduces the chance of a someone typing a mistake in the longer form. Regardless of how simple the language, there is always more than one way to do things. Rust is just giving you the choice to eliminate a lot of boilerplate if you so desire. In reality most Go users will opt to use the style mentioned above instead of something more verbose/complex and most Rust users will likely opt for the new ? operator.