3 ms·
Why not? I consider Rust to be superior in almost all respects apart from learnability and compile times. So if these two downsides are not more relevant than t
by cryptos 7y ago
Why not? I consider Rust to be superior in almost all respects apart from learnability and compile times. So if these two downsides are not more relevant than the downsides of Go (in a certain context), I don't see any reason why Go could not be replaced by Rust.
- jonathanstrange 7y agoAh, the Rust fanboys who vote down comments of anyone who criticizes Rust. They are actively trolling forums and spoil Rust for the rest of us. (IMHO, similar behaviour played a big role in the relative lack of success of CommonLisp, which is another language that I really like.) So I know both languages, have chosen Go instead of Rust for a larger programming project recently, and have 30+ years of programming experience, so I feel somewhat qualified to answer the question you ask---if you meant it seriously, which I doubt. People use Go for its simplicity, good tooling, good backwards compatibility, fast and modern automatic garbage collection, extensive libraries, and fast compilation speed. Yes, Rust is hard to learn, puts a constant high cognitive load on its users even once they have learned it, is relatively fast moving - meaning code you write now will likely not be idiomatic in a few years from now -, and has slow compilation speed. It has many other strengths, as you rightly point out, but most of them will not be a reason for someone who uses Go to switch to Rust. For example, most people who use Go do not need or want to quench the last performance out of their CPU and are less obsessed with zero-cost abstractions. Many C++ programmers, on the other hand, might appreciate these features of Rust. Rust and Go are simply not languages that compete with each other. Go is a competitor to Python, VisualBasic/Xojo, and various server-side scripting languages like Ruby and PHP. Rust is a competitor to C and some uses of C++, and maybe to languages like Ada and Haskell in some safety-relevant domains that do not require a formal language specification. The OP could have just as well suggested to use Ada instead of Go. It is possible to write Ada like Pascal, making it almost as easy to use as Go, but the suggestion still doesn't make much sense.
- cryptos 7y agoI'm not a Rust "fanboy". I'm not even a Rust developer, but I know the language somewhat. I've had my time with Go, but wasn't satisfied with it. Some things I didn't like in Go are better solved in Rust (generics and error handling for example). But thanks for replying seriously, even if you doubted that I wasn't only trolling (what was not my intent).
- 0815test 7y agoIt's not about learnability, compile times or anything like that - Go has a high-performance concurrent GC and Rust does not. There are whole domains, problems and the like that are basically unapproachable in Rust unless you're up for reimplementing half of a LISP system beforehand. (And people do - that's what the ECS pattern often boils down to!)
- mcguire 7y agoRust is a systems language (as in C, C++, or Ada), Go is an application language (as in Java, etc.).