Go: still better than just plain C.
Even beats Algol 68: http://cowlark.com/2009-11-15-go/
Go: still better than just plain C.
Even beats Algol 68: http://cowlark.com/2009-11-15-go/
Isn't the point of the article that Go doesn't actually beat Algol 68?
> The answer is that they're both very, very similar, with much the same level of functionality. They overlap more than they differ.
> Go has more in the way of actual features --- interfaces, channels, maps, defer , fallthough , proper closures --- but Brand X is more consistent with its features. […]
> Go, on the other hand, is full of corner cases. […]
> Most killingly of all, it's full of examples where they did not consult the literature. […]
> Brand X doesn't have any of these issues. Oh, it's got issues all of its own --- for example, the oddities in the reference type system; no varargs functions; no proper object system; the lack of little bits of syntactic sugar like keyworded composite structure literals... but it feels complete in a way that Go doesn't. I can use Brand X to implement nearly all the features of Go. I can't use Go to implement the features of Brand X.
> The only major features that Go has that Brand X doesn't are proper closures, and the interface system. And I'm afraid that's not enough.
> I would rather code in Brand X than Go.
Sort of. The point is that it's not modern at all, that it's actually comparable to Algol 68 without resorting to hyperbole.
In some ways, the article says Go beats it, in some other Algol wins.
Right, so Go does not beat Algol in the end.
And the article does conclude with preferring Algol to Go.
This seems to come up at every discussion about Go. What usually also comes up is how Rust is a much better designed language which solves real problems, while Go merely improves a little over C while leaving most of the same death-traps lying around.
Yet at the same time Go seems to have a much bigger adaptation than Rust. What's up with that? Are Googlers paid to create projects in Go, or are people genuinely happy to have anything which sucks less than C and stamped with a "final" badge of approval?
Well it has to do with Rust not even being 1.0 yet, whereas Go has been stable for 5 years...
Or with Rust changing some syntax in every point release for most of it's design cycle, so even early adopters had a difficult time.
Or maybe with Go having Google behind it, with the increased visibility it entails... (Rust, for one, never had huge Google Developer convention sessions exposing it to thousands of devs -- or any conventions for that matter).
And yet, we're already seen increased adoption for this pre-1.0 rust, major community playahs like Katz getting in the core team, more posts and libs every day, etc...
Go is about capturing dynamic languages' flow of development and put that on top of types and static compilation so you can improve early on performance and correctness (That doesn't even include inserting a "generic" way of coding concurrent processes).
Rust is much more about replacing C++ in features (from my little-knowledge POV): provide higher-level constructs to model your problem than raw C, with a heavy control over memory for maximum correctness and performance.
Rust may be better designed, yet I find it much more verbose and harder to understand than Go. While this may be a reason for the difference of adoption, a much bigger reason must be the difference in maturity.
The only features it has regarding that is GC, built-in hash-table and type inference. Hardly the gist of what makes dynamic languages flow a fast/nice one.
Plus Go was also advertised as "systems language" -- and besides, the same kind of programs Go is used for, servers, REST, network infrastructure stuff, etc, Rust will be used for too.
It's not like Rust is only (or primarily) for anything much lower level than Go.
No, the real feature is understanding that a language doesn't stop at the syntax, the tooling and the environment are extremely important:
- unless you want to build multiple binaries in one command, there is no need for any build helper.
- hack-compile-test cycles are really short, to the point you can run simplest go programs as scripts
- go has its own package manager, allowing you to manage dependencies extremely easily (not technically specific to dynamic languages, but in practice often associated with them) (Note that I'd prefer if everything was managed by my OS package manager, but we're not there yet)
The go creators (and community) has spent a lot of effort in improving the overall development environment, and this is a characteristic I have seen more developed in dynamic languages (again, I'm not saying that it's tied to a type of language, but I have seen this more developed with the pythubyerlascripts)
> It's not like Rust is only (or primarily) for anything much lower level than Go.
It's not, It's just targeted at different problems. You wouldn't use Go to build a game engine [1] (you need tight control over memory and have some realtime requirements), and I'm not sure you need the tight control that Rust gives you over memory when you build an image processing server [2] (you'll need concurrency primitives for this)
Why not?! Not all game engines need to be the next CryEngine or Unreal.
https://www.youtube.com/watch?v=cjn3twYB7xQ&list=UU7n_g2xDyS...
https://www.youtube.com/watch?v=uzQ2dnVac3Y&list=UU7n_g2xDyS...
Yet remarkably people are solving real problems with Go. Despite all of these dire predictions and pontifications on here by so many mortally offended by Go's existence, people are simply making solutions and moving on.
I don't believe I've heard of a single significant solution with Rust. I mean, I'm sure one exists somewhere, but it seems that it's caught in the advocacy trap of people talking about how great it is (overwhelmingly in Go discussions, it seems), instead of building solutions with it.
Servo is pretty much the motivating application for the Rust language. So you should keep your eye on that if you're interested.
That said, Rust doesn't have any real applications, because it's not out yet. The core team pretty much states, don't build anything significant in Rust atm.
It'll probably be out next year. Also Rust is a much more difficult language to grok, because it forces you to care about borrows.
That said, yes, before 1.0, you have to be a special kind of person to do such a risky thing. That said, Skylight can't really do it another way.
Also people do that with C, C++, Python, etc etc, so no need to invent Go at all, right?
This overall comparison might be a dead end, though. After all, we're comparing languages that effectively only have in common that they seem to have been spawned at vaguely the same time. Their philosophies are totally different.
Well, so far it looks like Rust resolves real problems in theory. In practice, I just see much more projects made in Go than in Rust. I confess that I didn't go hunting for Rust projects though.
Maybe it's the same as Mercurial vs Git. The latter is more popular, even if it's "worse", according to some.