Ruby is not a language that would ever be used for writing a web browser, Virtualmachine, OS kernel, or other high performance low-level software.
Nor is Go.
Rust is.
Ruby and Go are languages for writing servers, web apps, 'scripting', and high level stuff.
Rust has the interesting property that it may well be possible to write relatively sane higher-up-the-stack server software, in the land that Ruby and Go currently are popular, but it's not there yet.
If you want a replacement for Ruby, and don't want to use Go (for whatever reason), then I'd really advise asking "Why?", first.
If you want to learn and grow as a programmer, then learn a bunch of languages, and don't get too hung up on whether or nor they'll last. There's a good chance that in 20 years time we'll all be using something totally weird and different, so learning a bunch of different ways of working and learning to think in different terms from Ruby may be more use than any specific language. Learn Haskell, Rust, Racket, Erlang, Assembly, Forth, Ada, Fortran, C, D, Clojure and Scala, say.
If you want a very practical language for writing server stuff, quickly and without having to learn too much new stuff straight away, then maybe look at Elixir, Kotlin or Ceylon.
If you're happy with Ruby, then there's no real reason not to stick with it. It's a good language, and a lot of fun to use. (Elixir is superficially similar, if the aesthetic of Ruby code really appeals to you).
Rust should be pretty easy to write extensions for ruby in, so if you want to try branching out into Rust, for doing high performance / low-level stuff, then give that a go.
In general, I find Go works really well for anything I would normally code in C in userland.
A better way to put it: if you can reasonably write it in Java, you can almost definitely write it in Go. Nobody calls Java a "scripting language".
But yes, GUI apps would be pretty good in Go, if there was better library support. I totally agree.
I wasn't trying to say Go is a "scripting language"... Maybe that came across badly.
There's a lot of crossover from where 'scripting' merges into the 'real application' world. I had a bunch on bash scripts for writing large video projects to tapes, and synchronising projects on multiple workstations. I then wrote a very simple web app so that non-techies could control it too without the commandline. I then ended up writing a small job queue for that, and a few other bits to go along with it, some workstation monitoring, and so on. It's now a 3k lines small python application, with a few shell scripts underneath.
That domain, Go could work pretty well for too, I think.
No, it wouldn't. Browsers are too performance critical. You need an industrial-strength optimization pipeline in the compiler, and even having a GC is risky.
(There are numerous other smaller-but-still-critical reasons why Go's design prevents it from working as the implementation language for a competitive browser, but these two are the biggest show-stoppers.)
It's semantics are somewhat more complex that something like Go, but using it shouldn't prove much more complex that Go one you are used to the language basics. This could be of course my errors anaylising the problem, maybe it's way slower/complex and without any great benefit when precise memory management can be spared in favor of development speed. But even then I wonder if the existance of immutability, exhaustive pattern matching and an expressive type system don't increase heavily the realiability of Rust code hence providing stability reducing bugs.
> If you want a replacement for Ruby, and don't want to use Go (for whatever reason), then I'd really advise asking "Why?", first.
I'm slightly tired of not having a type system, I keep shooting myself in the foot and introducing little bugs that a type system would often get. In ruby heavy testing is very important and I find myself wanting things like immutability and pattern matching to ensure I handled exhaustiveness in my logical assertions during the program flow.
Also, my company pays way to much for not so much concurrent users because Ruby consumes a lot of memory. We have to think to much about deployments and horizontal scaling and I'd prefer something simpler to scale.
This are all problem that we have solved. They are natural to the dynamic character of Ruby, but the beautiful syntax and simplicity of DSLs come at a price in development and deployment.
Go feels a very poor language. Channels are nice and expressive, but the lack of a larger type system, error handling, it's mostly imperative semantics and excessive simplicity make it unattractive. I don't want a compiled Javascript, I want the quality of abstraction that simple tools can bring even though they may not be the easiest.
Javascript is very unrealiable and full of quirks. Go is too simple to offer level of abstraction we want to invest heavily in program correctness without too much testing. Ocaml has an interesting balance but I want statically linked binaries at all times and have no interesting in dealing with what seems a messy standard library and compiler flags to get the exact result I want. Haskell's too complex to learn for any practical use. Purescript seems interesting but suffers from the same complexity as Haskell. Many other languages are not safe even though they're fast and compiled and many JVM languages are way to close to Java which I would love to see disappear during my lifetime.
It's very picky, but hopefully the downsides of every language appear clear as to why I'd consider Rust instead of Go as a replacement to ruby.
That's a nice overview of CSP. It's not a selling point for Go over Rust. Rust threads are in fact a purer implementation of CSP than Go goroutines are.
Going back to my proposed question, maybe people can prefer golang for this syntactic benefit but I don't think that addresses the larger set of differences that usually separate them.
As for moving from Ruby to Rust or Go, Go is almost guaranteed to be faster for developers to learn. The reason for the complaints in the article is that Go is intentionally simple, and you're seeing many people migrating from dynamic languages to Go for those benefits. The fact that Go has its roots in C will make it immediately understandable to anyone with experience in a C-type language.
My final thought is going to address libraries and widespread acceptance. Regardless of your thoughts about Go as a language, there is no doubt it is here to stay. Underlying major technologies like Docker, it has already seen massive adoption. While initial signs are positive for Rust, you're still betting that it continues to build momentum and doesn't stagnate like Haskell.
I'm yet to verify this, but it seems that Rust is closer to Haskell in that it intends to enhance the likeliness of program correctness as it's being written and not only through testing. In go you still get runtime errors and I don't think it's all that rare, Rust should reduce those greatly.
I do share that adoption through libraries and widespread acceptance is very important and when you compare Rust to Haskell you make a nice point, the language could be great but not generate adoption.
However besides adoption I don't see anyone who seem to dislike the process of writing Rust itself. Apparently people think it's viable if more libraries are out there. The natural presentation of the arguments made me feel that people are open to it should the right libraries be there.
That doesn't seem like the kind of comment to start a meaningful conversation. I must ask, what data do you have behind that statement.
I think both languages offer their own set of pros and cons.
For me, Go has been my go-to because of the maturity of the language. And, it has been implemented in systems that run at a very large scale by people within Google/YouTube as well as CloudFlare.
Would I consider it? Honestly, maybe one day. But that depends on how the language, and related things, mature over the next few years. And I think it's after the libraries have filled-in, and there is experience running systems built with it at scale.
Go is allowing me to solve the problems I have right now with some well-built packages. Is it perfect for everything, no. But it does well in a lot of areas.
I do think there will be space for both and I would prefer to consider them as raw tools, hence the language themselves, and take the risk of having a community in the future sharing libraries for common things. It's a risk but not a crazy one I'd say and probably helpful for the analysis.
Building on your reply, I'd say prove of adoption is one downside for choosing Rust. This however ignores the merit of Rust as a language which hints me into what I have begun to see more often: that it's the newness and relative absence of production use cases that don't seem to validate it viability, not some inherent complexity or downside to the language itself.