6 ms·
This is good advice. I am totally confused by the Rust vs Go debate. They occupy such different spaces.
by fmstephe 11y ago
This is good advice. I am totally confused by the Rust vs Go debate. They occupy such different spaces.
- derefr 11y agoI think the reasoning behind the debate is that, together, they mostly obsolete C/C++. Go takes the high-end and Rust takes the low-end, and there's no niche left for C to occupy in the middle. I guess the real answer is, if you want to learn "the language that people will be using instead of C in ten years"... learn both of them.
- 0xFFC 11y agoI don't think so. Of course, there is space for Rust and Go. But that does not mean there will be no niche for C and C++. That is simply not correct. Ignoring C and C++ mean you are ignoring maybe billion $ industry around them . and That is simply wishful thinking.
- ybx 11y agoSure, but you could argue the same for things like COBOL
- kamaal 11y ago>>Ignoring C and C++ mean you are ignoring maybe billion $ industry around them Right, very difficult to move the inertia in any direction. The same is true about Java too. But there are fewer reasons for any starting a new project to do it in C or C++. Newer stuff replaces older stuff, Heck when C came along, there were languages with billion $ industry around them. C replaced them.
- tux 11y ago"together, they mostly obsolete C/C++. Go takes the high-end and Rust takes the low-end" In that case some one just code "GoRust" language ^_^
- untothebreach 11y agoNah, just use CGo to link to a lower-level Rust library :)
- nickpsecurity 11y agoGo is of Pascal tradition of simple, efficient programming languages. Rust has memory and concurrency safety. So GoRust would be... Concurrent Pascal (1975) by Brinch Hansen http://brinch-hansen.net/papers/ http://brinch-hansen.net/papers/ ...Concurrent Pascal used in Solo OS. It supported human review via readable syntax, type safety, safe ops on memory, and a concurrency system that caught race conditions at compile time. The runtime underlying the OS was about 4K with the OS itself concise enough to put in one PDF in source form. So, Hansen for the [1975] win in the GoRust competition?
- yoklov 11y agoAs someone in the games industry, I don't see anybody moving towards either of these languages over C++, or really even any excitement over them. I'd be very surprised if Rust displaces C++ here, and put the chance of Go doing so at pretty much 0. If anything, the current trend is moving more low level (rather than higher level, which these languages both are), as techniques like data oriented design becoming more mainstream.
- steveklabnik 11y ago> (rather than higher level, which these languages both are) Rust should be (and is, modulo wrinkles, I mean there's no fundamental reason) as low level as it gets. What makes Rust too high-level for gamedev?
- Sharlin 11y agoI guess Rust has many features people are only used to seeing in high level languages - and to some people that equals "too much abstraction" which equals "slow". But the thing is - Rust's "high-level" features are all compile time with either no or very little runtime overhead.
- mike_hearn 11y agoIt's probably not too high level for game dev. However, modern AAA game dev is largely about customising and upgrading large existing game engines, which are all C++ based. Rust could be used for them, but isn't, and the extra features Rust brings are not compelling enough to rewrite huge amounts of working code and suffer (re)training costs. This is a hole many new languages find themselves in. JetBrains have come up with a very clever solution for their Java/Scala competitor Kotlin: the language was carefully designed from the ground up with perfect Java interop in mind (Java/Kotlin call into each other seamlessly, the IDE can refactor across languages, Kotlin uses the same standard library etc). And quite amazingly, the IDE can automatically rewrite Java into Kotlin. This isn't a party trick, it works very well. I think if Rust wants/wanted to be a serious competitor to or upgrade path from C++ it'd have needed to take at least some level of C++ interop into account from the start such that Rust and C++ could be intermixed freely. AFAIK though, the best you get is a typical C export/import layer which is too trivial to be compelling. Of course, it's a lot harder than connecting with Java because of the way C++ stuff is defined using header files. But at least basic interop could have been done.
- Avshalom 11y agoBecause we have weird memories we all still remember Go claiming to be a systems programming language, which everyone took to mean "programming language you would use when you need to talk to metal" but which A) Go isn't suited for B)Rob Pike decided meant "programming language you would use to when you need to write a program" Rust sort of went public around the same time as Go which automatically "made it" a competitor AND actually is a programming language you would use when you need to talk to metal. So now people have tied them up in a PR battle.
- untothebreach 11y agoI think there was the added wrinkle of "programming language made by the company that also makes Chrome" vs "programming language made by the company that also makes Firefox". Google's and Mozilla's browsers were/are competitors, so why wouldn't there programming languages be? Obviously, the two companies have completely different reasons for the development of the new languages, but I think that was overlooked at the time that Rust first came out.
- nickpsecurity 11y agoI'm going with your assessment of things as I think that's why it stays stuck in my head to a degree. The other reason is it was a modern version of Oberon: a simple, GC'd, system language ETH wrote operating systems with. Given that, I still assume an OS can be written in Go in current form or with small changes (eg runtime, FFI). Hell, people wrote OS's in Haskell, Java, and C#. JX partly put the device drivers in Java. I'd be shocked if Go was only one that couldn't handle it.
- geofft 11y agoYup. It turns out that Google internally uses C++ for developing web applications (or at least HTTP API endpoints), which nobody on the outside quite internalized. So Go is a perfectly reasonable C++ replacement from the point of view of Google, but doesn't hit the majority of use cases outside, and it feels rather more like a compiled competitor to Python/Ruby/etc. to most of us on the outside. Also, until about a year before 1.0, Rust had heavy focus on lightweight concurrency (à la goroutines), a garbage collector built into the language (or at least plans for one, complete with syntax), a mandatory runtime to manage those things, etc. You had to give up on the standard library if you wanted to use Rust code as a shared library in non-Rust programs. That changed fairly rapidly, and the last bits of that (like runtime removal) only hit a few months before 1.0, so people's first impressions of Rust were much closer to that of Go. They're very different languages today. It is technically true that for both of them they are better than C++ for some things people have traditionally used C++ for, but once you get beyond that they're not that similar.