▲ | josephg 5 days ago | |
> Rust can also make some types of software more productive to write, but it is unlikely to beat Go in terms of productivity when it comes to a lot of the stuff SaaS shops deal with. And boy, the software industry sure is swamped in fucking SaaS. I just wish Go supported parametric enums (sum types) and Option, rather than copying Hoare’s billion dollar mistake. I ported some code to Go and rust a few years ago to try both languages out. The rust code ended up being 30% smaller because I could use an enum and a match expression. In Go I needed to make a set of types and interface{} to achieve the same thing - which was both slower and way more verbose. My rust implementation was as fast as my C implementation in 2/3rds as much code. And it was trivial to debug. My Go implementation took way more code to write - about the same amount of code as C, but it was harder to read than C and ran much slower. For cookie cutter SAAS and prototypes, I prefer typescript. It’s fast enough for most things, and the type system is much more expressive without getting in your way. Not as convenient to deploy as go - especially on mobile. And the standard library is more like an attic. But in my opinion it’s a much better designed language. | ||
▲ | Philpax 4 days ago | parent [-] | |
You're not the only one who wishes Go was just a bit more like Rust: https://github.com/borgo-lang/borgo Sadly, that project seems to be dead, but I hope someone picks up its mantle some day. A marginally better Go could, well, go far. |