3 ms·
When I think about Go in comparison to other languages, I think of car metaphors. Lots of people talk about cars that are good. Some people think a good car is
by aeturnum 10y ago
When I think about Go in comparison to other languages, I think of car metaphors. Lots of people talk about cars that are good. Some people think a good car is fast, some people think a good car is low maintenance, some people think a good car is eye-catching. They are all right, those are all descriptors of good cars.
Go, however, is like a Toyota Corolla or a Honda Civic. It's dependable, but relatively plain. It's not necessarily a joy to drive but there's not much of a learning curve. It lets you go fast, but not so fast you'd hurt yourself. It's designed with safety in mind, so much so that it can feel a little over-bearing at times.
It's not a language that draws you in with one clear feature or philosophy. I've used it very successfully and I still find myself rolling my eyes at "go-isms." Lines of "ok, err = ...", rewriting extremely similar data structures, careful channel management, etc. In a list of dependencies, the go dependency will need the least maintenance time and tuning, but what you do need will often be drudgery.
Go is a useful language, but it's a language that has purposefully stripped out all the magic. People like magic, they miss it.
- artursapek 10y ago> Go is a useful language, but it's a language that has purposefully stripped out all the magic. People like magic, they miss it. I agree with everything you wrote except this. After 3 years in a job where I had to use Ruby on Rails, I am utterly tired of "magic" and I regret the many hours of my life I have wasted debugging issues that were created/concealed by it. Lack of magic is a feature in my opinion. But as you said, that's all this is - opinions.
- strken 10y agoI find Forth, Ruby, Elixir, various Lisps, etc. almost impossible to reason about because of this. Powerful metaprogramming tools can lead to really hard to understand and hard to refactor code.
- artursapek 10y agoRefactoring is the worst part, so bad that people just don't do it. This naturally leads to very convoluted code bases. Ugh. Never again. And actually, this is another place Go shines. Refactoring Go code is easy because the compiler helps you along. There's even standard tooling that automates some of it. Amazing.
- enraged_camel 10y ago>>Powerful metaprogramming tools can lead to really hard to understand and hard to refactor code. They can, but that doesn't necessarily mean they do. For example, the usage of Elixir macros, which are the primary metaprogramming tool in Elixir, is discouraged in the docs: http://elixir-lang.org/getting-started/meta/macros.html#foreword http://elixir-lang.org/getting-started/meta/macros.html#fore...
- geoka9 10y agoUsing a similar metaphor, I'd compare Go with a jet that's high performance but easy to fly - i.e. it doesn't have the numerous gotchas and quirks high performance jets usually have that the pilot has always have to keep in mind to avoid shooting themselves in the foot (aka making a hole in the ground :)). E.g. it won't let you overload your engine by using a very special feature that lets you get away with it, but it'll let you fly fast and enjoy afterwards how trouble free the experience was. OK, I think I'll stop with the mataphors now :)
- bsg75 10y agoMaybe a turboprop metaphor? https://warisboring.com/stop-disrespecting-the-turboprop-c00acd3fff3a#.hzso32og2 https://warisboring.com/stop-disrespecting-the-turboprop-c00... https://news.ycombinator.com/item?id=13461948 https://news.ycombinator.com/item?id=13461948
- omginternets 10y ago>Go is a useful language, but it's a language that has purposefully stripped out all the magic. People like magic, they miss it. Agreed, and I'd further argue: 1) most people driving Ferraris aren't skilled enough to drive them properly 2) most people driving Ferraris have no need to corner at 120 MPH 3) most people driving Ferraris are just trying to show off 4) most people driving Ferraris are more likely to hurt themselves and others than to save the day through the car's performance and handling (To be clear: I think we're in agreement, but the metaphor is worth explaining in depth)
- prodigal_erik 10y agoIt's an apt metaphor. Much like programming, there are a hell of a lot of people driving who really shouldn't be.
- eeZah7Ux 10y agoThen there should be programming licenses: Level 1: let interns use Go(-karts), like their parents did with Basic. Level 2: most languages. Proper training required and you still have to be careful. Level 3: C, C++, critical code, kernels, crypto code. Training a commercial airline pilot takes years; and while this stuff is not hip enough for some, there's plenty of demand.
- pka 10y agoC programmers should be held personally accountable for the damage they cause. Now of course everybody makes mistakes, but if you deliberately choose C when there are better options available then you should pay out of pocket for your buffer overflows and 0-day exploits.
- aeturnum 10y agoYes, I think there are a lot of parallels between high performance cars and high performance languages. Both are held in high esteem and are frequently mis-used when a more balanced vehicle would do better.
- baby 10y ago> It's not necessarily a joy to drive Go is the most fun language I've been using. On the contrary, I don't understand how some people can enjoy Java.
- watwut 10y agoThe thing that makes java pleasant is large open source ecosystem around it + IDE quality (meaning mostly refactoring and code navigation, especially when compared to dynamic languages). Frameworks like spring or hibernate etc are mature enough and old enough, so there is a lot to learn just by reading. The language itself makes it easier to figure out what large code written by somebody else was mean to do - not that everything would be readable nor anything like that, but easier then say ruby or javascript.
- zik 10y ago> Go, however, is like a Toyota Corolla or a Honda Civic. The only problem with this argument is that everywhere - even in this thread - there are people saying that Go is a joy to program in. It's not lacking magic, it's magical in its own right. A better car analogy would be that Go is a Lotus Elise. It's nowhere near as powerful as your friend C++'s Mustang or Rusty's McLaren. But to C++ and Rusty's dismay Go's little Elise still gets around a racetrack crazy fast. It may have a smaller engine but it's just taken a really different approach to going fast which works really well. And Go has a much more pleasant time getting to his destination than C++ and Rusty do.
- peteretep 10y agoSome people find dull cars a joy to drive.
- enraged_camel 10y ago>>>> Go, however, is like a Toyota Corolla or a Honda Civic. >>The only problem with this argument is that everywhere - even in this thread - there are people saying that Go is a joy to program in. Not sure why it's a "problem". I love driving my 2004 Honda Civic, and prefer it to newer, fancier cars. It's fuel-efficient, drives very well, and has not given me an ounce of trouble. So yeah, the comparison to Go seems very apt.