by PopsiclePete · 11y ago · 0 comments
and the article linked from that comment is why I think Go is posed to become dominant over other new languages like Rust.
Go's documentation, tutorials, videos, support, community - what forms the ecosystem, basically - is really the reason why I keep coming back to it.
The core language might not be super-exciting, and it might not be as fast as others, as elegant as others, as "powerful" as others, as feature-rich as others, but the overall experience is very, very pleasant.
For me, Go seemed very low level -- I mean, it even had pointers! But then I tried to rewrite some GNU utilities in Go (still not sure _why_) and I had to translate C to Go, which flipped my world upside down.
Simply because Go was easy enough for me to write as a beginner but close enough to the hardware for me to want to explore, I've learned a lot about the Linux kernel, C, GNU, programming best practices, and so on.
And the best part is everybody is do damn friendly. If I'd ask a dumb question about Go I'd get a friendly response, along with RTFM. With C? Usually just RTFM.
Robert, Rob, and Ken did a fine job. (Along with Brad, Russ, et al.)
On a side note, why does every discussion about Go seem to turn immediately into a comparison/argument between Go and Rust? I'm not an expert in either language, but I don't see why the two languages can't coexist.
1. Download tar.gz (or zip) 2. Extract to <place> 3. export GOROOT=<place> 4. export GOPATH=<some_other_place>
... if you want to get fancy and make sure all your binaries are automatically in your path
5. export PATH=$PATH:$GOPATH/bin
... at this point setup is done, to build your first project using an external library
6. go get github.com/<user>/<library> 7. code, code, use <library>, zug, zug... save code in $GOPATH/src/<your_package> 8. go install <your_package> 9. $ <your_package> # runs it
this package can be shared because it is a static binary -- share with your friends, run on other servers, heck -- even cross-compile for other platforms with ease. Working on Linux -- but want to ship a utility to do X for a friend on Windows, no problem!
Building your own working Go installation from source is one command, then building a Go project, yours or someone else is one more command.
You're right that GOPATH needs to be set, but is that really any different to having Python, Perl, Ruby, etc JIT's in your PATH env var? And GOPATH is certainly more convenient when it comes to the distribution of program (ie copying the compiled PE / ELF) than having to ensure that you have a Perl et al run time environment (and particularly any required non-standard imports) installed on the destination system.
But Go isn't a JIT / scripting language, so that's probably not a far comparison. So let's compare it to it's closer relatives: C# and Java. Java is just a mess from a UX perspective. It's a mess to install, it's a mess to redistribute. It's just a complete mess compared with Go. C#, however, is a very friendly language to approach as a new developer - if you're writing applications on Windows and for Windows. I will grant you that .NET is open source and cross platform, and that recent reports suggest .NET projects will become more portable in future years, but you still need a Mono runtime on non-Windows platforms. Go compiles it's dependencies into it's binary (hence the size of the binary).
I'm by no means saying Go is perfect, but lots of people have tried to solve the problem you're raising and more often the case is their attempts are less user friendly than Go. Which leads me to think that maybe the minor inconvenience of having to define GOPATH (and it really only needs to be defined once in the entire lifetime of your Go development machine) is a pretty good usability solution.
Maybe (or maybe not) you'll find this[0] useful: touch .gopath in some project directory, your GOPATH and PATH will be set automatically upon cding inside.
Then, work straight on the root for simplest projects or prototyping, or inside src for multi-package projects. In any case, deps will go in src, and you can readily vendor them, or use git submodule, or a simple shell script containing a sequence of "git clone", or not at all. No tool like godep, no import rewriting, no global workspace, per project dependencies, zero overhead.
[0]: https://github.com/lloeki/dotfiles/blob/master/shell/go
Apples to oranges. Rust is aiming to be a C++ replacement.
Rust is so unbelievably safe to use in complex, efficient systems. Rust is, IMO, the state of the art in programming languages.
Once you put the few months into actually getting OK at it you can write really great code, really fast and not be stuck with burdens since the compiler makes you write code that will work.
Given the incredible complexity of C++, I would much rather see Rust or Go come to those systems rather than C++.
There are still jobs I have done in the past that would require C today, but they were never suited for C++. Specifically it was work for realtime systems that required a highly trustworthy compiler like CompCert, the likes of which did not (and I believe still does not) exist for C++.
http://commandcenter.blogspot.it/2012/06/less-is-exponential...
While apple and oranges is an appropriate metaphor for the approach that the two languages take, Go and Rust are vastly different, their goal of being systems programming languages is not.
Why does every Go posting have to have the same argument about the pros and cons of the language against other languages, and peoples opinions of why they like or dislike go? It's so repetitive.
I agree that complete documentation, good stdlib, intuitive build/package system, and friendly community are part of a language's success. But how does Rust fail at those compared to go, considering it hasn't released 1.0 stable?
Just playing devil's advocate here as I am a rust fan.
So every tutorial, every article, every video, every blog post is still an excellent source of information, 5 years later.
Rust? Anything you read that is more than a week old is basically wrong. Entire language features, syntax, keywords have been ripped and thrown into oblivion - the @ qualifier, the ~ qualifier, the entire i/o library is being rethought...
These aren't bad things. I'm a huge fan of not maintaining infinite backwards compatibility.
But it leaves a strange taste in my mouth. Go was basically "done" in the general sense in early 2010. Rust reinvents itself every 3 months. You could say that the Go authors knew better what they wanted from the get-go, maybe? There's a sense of "they know exactly what they wanted" vs "these guys are shooting in the dark and hoping to hit the bulls-eye" which is kind of the impression Rust leaves me with.
Rust has many more features than Go. (And language complexity increases approximately combinatorially with the number of features.) Features in Rust are decided more democratically. Rust designers are OK with a long (re)discovery period for features to find the purest design.
I believe these differences in language authorship explains the churn that Rust has experienced relative to Go.
One way to put it is that this highlights Go from a user's perspective.
The very same thing is true from the compiler developer's perspective.
I've found that the process of installing dependencies, pulling source, navigating source, building, testing, contributing patches, etc is important for success--as well as the user experience.
I've had bug-fix patches accepted into Clang, GHC, and Rust. I found Rust to be a bit pricklier than Clang and GHC. I'd like to make time to get a similar experience with Go--I suspect it would be good.
Check out /r/lang_name subs on Reddit, you will not find many other communities as vibrant (maybe some, but not the majority). Then check out rust_gamedev, dedicated to game programming.
I have not checked out their IRC but excerpts from IRC on /r/rust tells me the community is vibrant on both ends of the hose. They also had like one bad incident on IRC about a gender issue, and they shut that crap down with a strict Code of Conduct imposed everywhere. Whether or not your are into that, I think they take community management very seriously, and regardless of politics, I applaud that.
They have done every single thing about the language through RFCs and discussions of bugs and PRs on Github from almost project inception, where the community drives a lot.
There are very talented people writing tutorials on writing Rust, from tooling, to the Servo web browser experimentation, to http server libraries like Chris Morgan's work, to work on the Piston game dev library.
Granted, I have not checked for videos yet. Others correct me if I am wrong.
I mean, I understand that Go has these things, but maybe I am reading too much into your comment. I just think Rust has a wonderful community, media and all, about what you can do with it.
Rust is nonetheless a work in progress. I am not saying this to be judgemental, but Googlers released Go after work was complete at some stage. Volunteers and a few Mozillans have worked on Rust iteratively, on many iterations and revisions, out in the open. This makes a big difference in perception and how easy it is to get started.
Granted, I have not started with either. But what keeps me interested in Rust, even though it is way out of my comfort zone and I have terrible systems programming knowledge, is exactly about what you describe with Go.
For me, I look Rust more, personally, because of my perception they are willing to try simple, try complicated, but as long as it is a reasoned discussion about language design. And the best part: IF X IN RUST DOES NOT WORK, OUR BAD, WE THROW IT AWAY. I caps that because it is so refreshing to see that. People have complained a lot. Some of the complaints are there, but many redundant or irritating features were removed simply because they were not useful or outlived usefulness. I wish this honest experimentation was more frequent in the industry, but my myopic view, as largely an outsider, is that it is not the norm. (And to be clear, I am not saying Go or language X does not do these things, but observing Rust you see they are briskly paced but willing to make deliberate changes at a pace and keep reviewing the drawing board; I cannot pass judgement on other langs, and this is just my impression.)
But it's fundamentally an open-source project. The only funding from Google comes in the form of paying some of the members' salaries. That's it.
I think the interest in Go has been increasing with or without Google's name tacked on to it, honestly.
Otherwise, you might as well say that the only interest in Rust is because it's funded by Mozilla?
> Otherwise, you might as well say that the only interest in Rust is because it's funded by Mozilla?
Of course some interest in Rust is because it's funded by Mozilla, but the difference is the only there.
Go and Rust differ in that Rust actually builds upon the last few decades of programming language research and takes a good shot at solving some real-world problems. It occupies the same space as C/C++ but solves many issues that plague both languages. You could explain Rust's popularity by association with Mozilla, but you could also explain its popularity by the fact that it's actually a pretty interesting, well-designed language.
Meanwhile Go is neither low-level enough to be useful for performance/memory intensive work nor does it provide reasonable features to compete with higher level languages. It solves some very Google-specific problems (compilation time? If compilation time is an issue for you, it's much more probable that you've done something wrong than that you need a faster-compiling language). And to do that it gives up features which make it inappropriate for almost every project (I don't even want to hear about how you don't need generics--if you're creating empty interfaces you should be using a dynamically typed language and if you're using `go generate` you should go back to 1980 and rediscover why type-unaware code generation is fucking terrible idea). Literally every feature in Go is done better in languages that existed before. Go brings literally no innovation to the table (if you say that Go has a new way to do threading my head will explode). And Go doesn't even include most of the innovations of the last few decades of language design. It's literally decades behind. Given that, I can think of no explanation for its popularity except its association with Google. There's simply nothing it has going for it except hype.
And yet it doesn't matter, because PL research is so broken, that it fails to provide us with even basic understanding on how people write code.
p.s. Your hatred of Go is kind of funny to this outsider. I may be just a stupid coder w/o a CS degree but spent a couple of decades in the trenches. Since a superior language would naturally eliminate the puny offerings of Go, I await your wisdom in the language that will save me and other mindless drones from futile coding. Please enlighten me with the language that will save me from this programming plague.
Not only that, but there's less than 6 people probably in Google who work "full time" on it. For the vast majority of other Google employees it's a "20%" project. More and more of the pie is being worked on by the community, not the core Google team.
I know you hate Go, I realize that, but other people like it, and it's not because "The Great and Almighty Google" is shoving it down our throats?
I hate PHP with a passion for example, but I don't think there's a vast conspiracy to see it still being pushed around?
Is there some law that says that any top comment on HN that mentions either Rust or Go, a mention of the other is bound to happen in the same sentence? Like some kind of magnetic, rhetorical force. Heh.
If either, or both, Rust or Go succeeds, it will be for widely different reasons. edit: to whoever is adamant about downvoting my questions for today; you forgot the one previous to this one.