Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> It strikes me that Go is riding the peak of hype languages.

Very much so. Also it seems to be a strange choice as a solo developer when its strengths are explicitly targeted at large organizations. And I think the tooling is actually a bit of a mess compared to some other options. God help you if as a solo developer you start building on top of protobufs (another basically default choice in the Golang world...).

I just don't understand why you wouldn't choose something faster and more expressive.



Protobuf is not the default in Go the default is REST. What tools are a mess? Go tooling ( runtime ) and IDE integration is very good.

Go is not a hyped language, we're past that cycle, some critical and widely used software are built in Go, millions of people rely on it.


Go tooling was relatively very good a decade ago but other languages have improved a lot since then, significantly because of its influence, and it's now about average. It's still better than python, and C or C++ of course. But about even with typescript, ruby, shit even php and ocaml have nearly caught up with their tooling. Go's is significantly worse than rust god help us and elixir has always made good excellent here.

I wouldn't call its tooling "a mess" but these days it's nothing notable either.


Go was explicitly designed for fast compile times, especially compared to C++, and I haven't heard anything to suggest that's no longer the case. It was also designed as a more modern and mature replacement for C, and I can't think of many application domains where C is still the better choice.

Python is at such a different point in the design space I don't think you can really compare the two. Same with PHP, Ruby, Javascript etc.

For OCaml, need to decide how strongly you want to commit yourself to functional programming. Also, didn't OCaml have weak support for concurrency? Has that changed recently?

Similarly with Rust, comes down how much you want to commit yourself to learning and conforming to the borrow checker.

Elixir is an interesting comparison, as it's another language that allows you to build highly concurrent back end services. The tradeoffs are that Elixir provides even more robust scaling due to the Erlang VM. But Go allows you to more easily understand and optimize the memory and CPU performance of your application.


> Also, didn't OCaml have weak support for concurrency? Has that changed recently?

OCaml has had Lwt for concurrent IO for long enough that it is now being deprecated in favor of Eio[1]:

https://github.com/ocsigen/lwt

[1] https://github.com/ocaml-multicore/eio


Well regardless of the goals or intent of its creators, it has found success as a general purpose language suited to a broad set of unrelated tasks. And in fact that is exactly how it is being recommended here by the articles author: so within this context I don't think it makes sense to exclude these other languages.

But even aside from that we were just talking about tooling at the moment.


> Go was explicitly designed for fast compile times, especially compared to C++, and I haven't heard anything to suggest that's no longer the case

Well, it’s quite easy to be fast if you are just spewing out barely optimized machine code. Compilers aren’t slow just for the sake of it.


My understanding is there are more fundamental reasons for why Go compiles faster, like how it handles "includes". And not supporting the C++ templating system.

And some things that slow down compiles are not to improve optimization. But to support complex, higher level language features. Go seems to hit a sweet spot of being highly expressive without slow compile times.


Highly expressive????? Come on… what kool aid are you on??


I consider that a win too tbh; JS land has improved a lot with e.g. Prettier and now Biome, and those were inspired by Go's formatter and stance saying "shut the fuck up about code formatting already, this is how it's formatted, end of story, go worry about more important things".


Go tooling is far better than Elixir and I would say above Rust.

You should have a look what the go command can do.


OK fair, I am a couple years out of date on go (and also rust) myself, so I'm comparing my recollection of both to elixir's current state.


Bazel.

While not Go-specific, it's the extremely popular option in the space and I've seen it bring many-a-seasoned wizard to their knees in tears.

Also managing your go dependencies if you cargo-cult other Google behaviors like monorepos tends to be painful.

Basically just cargo-culting Google behavior == pain. Choosing golang can often be part of this behavior pattern.


Bazel is not a Go default either. You can get very far just by using the default Go Modules, and this is much more common than repos using Bazel.

Throw some Makefiles and shell scripts in the mix, if that's your thing, and that's perfectly fine.


Obviously but if you look at a lot of Go projects you tend to see it.

Especially in a corporate space. It should be obvious that I'm referring to things that you see in a professional environment with professional standards. I'm getting a lot of hate where that seems to be lost on people.

And even if someone is a solo developer I don't assume that they don't ever have to work with other people's code -- that certainly wasn't my experience when solo contracting.


Because you are attributing things that are common in enterprise environments (Bazel, monorepos, and Protobufs) to Go. It's fine if you hate these things, but saying that these are the defaults of Go isn't right, and I bet that's why people are hating on you. There's nothing default about them in Go. If you work with enterprise-y code, it shouldn't be surprising that a lot of them are going to follow Google's steps.


Go was designed for use in enterprise environments. It was literally designed for Google's specific development problems.

Nothing about Go's design should be talked about divorced from the context of it being tailor-built to solve Google-specific problems.

All other uses of Golang are basically in the territory of rounding error.


The opposite seems true (regarding Go being over-fitted to Google problems).

It was designed for Google, but Google has not adopted it widely. Google is still heavily C++ and Java after all these years. The outside world loves it way more. Kubernetes isn't used internally at Google (except Cloud, which is not any different from any other cloud provider) though it's sponsored by Google. Bazel is probably in a similar boat.

Being designed to solve Google problems doesn't mean that it actually solves Google problems well, or that Google thinks it does.

I became introduced to Go through my startup and my experience was it a delight to work with in very small teams.


True for the early days of Go but I don't know about now. I think the switch started happening right after modules came out. Generics and the new range stuff seem more for the sake of growing the language than specific needs in Google.


I wish Bazel was a Go project. Unfortunately, it's written in Java.


Author here. Well, it has worked pretty well for me so far, so I don't know why I would switch. Go is fast and expressive enough for my use, and it's probably outweighed by being super familiar anyway.

(BTW, in my eight years of Go, I think I've used protobufs maybe once or twice. HTTP FTW!)


Do you have better alternatives to Protobuf?

What are the shortcomings that you find with it? At work these choices have been out of my hands but I've used JSON Avro and Protobuf and I felt like Protobuf was the least prone to errors, best surrounding tooling and easy migrations while maintaining small payloads.


> I just don't understand why you wouldn't choose something faster and more expressive.

The answer to this is as simple as genuinely asking, answering, and understanding why you don't do all of your development in assembly language.


I didn't mean faster in terms of execution time but in terms of development time. And more expressive is doing more with less code.

We're at complete opposite ends of the spectrum here -- how that indicated to you that I meant assembly...


I'm genuinely curious which language you see as having a better development time. I don't mean that as arguing, I'm actually curious. I don't know much about Go but I just began learning it 2 days ago. I'm already 50% of the way done through a really nice TUI app, and I haven't even touched the docs.

To me at least, it feels extremely productive so far.


Developing with Python is faster.


When leaning on libraries pushing what's new in computer science, like certain facets of machine learning as a prominent example, which generally aren't found outside of the Python ecosystem, certainly. But head-to-head on well-trodden computer science paths, Python doesn't stand a chance.


Only for small or new projects...


It's the same principle.

My own experience (I'm not the author) is that the investment required to reach the point where Go can be a "hammer" as in this case is lower (usually significantly lower) than with "faster and more expressive" languages.


Go might not be the most concise or expressive language, but it's quite fast in terms of development time, IMO/IME.


Yeah, you just write code without worrying about whether it can be done more concise or clever, it's a very pragmatic language.

The downside is code volume, but honestly that is rarely the problem in software.


Faster on what axis?

Go has maybe the fastest compile times, for example. Which is very important when you are iterating on a project.

What do you dislike about the tool chain? Seems better than most languages to me.


Java’s toolchain may leave some to be desired in ergonomics, but compile time is just as fast if not faster.


What do you see missing in the Java toolchain? Frankly, I see it as one of the most complete and deep of all languages.


Only ergonomics, I do actually like most of it (maven central/repository model and gradle). It is one of two truly general build tools (other being Bazel), and being that generic/capable does mean that it can’t be as user friendly as a single-language build tool like Go’s or Rust’s. But these all break down the moment you introduce another language/build step/whatever, while Gradle can build the whole hodgepodge that is the Android platform just fine, which is quite a testament to its power.


Do you have better alternatives to Protobuf?

What are the shortcomings that you find with it? At work these choices have been out of my hands but I've used JSON Avro and Protobuf and I felt like Protobuf was the least prone to errors, best surrounding tooling and easy migrations while maintaining small payloads.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: