Live data from Hacker News

What makes you enjoy Go lang?

news.ycombinator.com

21–30 of 44 posts

Re: What makes you enjoy Go lang?

#23

Things I love about it: - gofmt. The fact that it comes with an opinionated formatter means I don't waste time with bikeshedding. - Simplicity. I love how Go just gets out of my way and lets me do my work. I also don't need to worry about crazy abstractions and deep levels of inheritance. - I usually don't need to worry about performance bottlenecks. Go is pretty fast. - Typed. Over time I ended up hating languages l…

Thank you for this comprehensive list, this made me more excited about the language.

These were the highlights for me: - Simplicity - Typed - Go-routines - Single binaries (Cross-compilation is just an environment variable)

> - Nil pointers. It would be great if there was a way to ensure points will never be nil.

Like Dart sound null safety?

Re: What makes you enjoy Go lang?

#24
post #7

I prefer go because of its minimalism. Besides the basics and concurrency part, all you have is structs, Interfaces and type aliases. Even generics were absent for a while. That prevents over engineering to a great deal unless like languages such as Python. Looking at Django for instance, tons of side mixin based views and what not. Sure, clever but hard to comprehend whereas the primary purpose of programming langua…

> Besides the basics and concurrency part, all you have is structs, Interfaces and type aliases.

Yes, this is what makes me so interested in Go!

Re: What makes you enjoy Go lang?

#25
I think golang is a terrible replacement for applications that require a proper framework-level library to allow you to crank out a lot of functionality very fast.

The language is too weak to allow frameworks to be built on top of it. At the same time the standard library is the sanest I have ever seen in a language, both low-level, cross-platform and elegant. As someone else mentioned in this thread: "The language is so barren that you end up having insufficient abstraction power to make simple things simple. Instead simple things are verbose."

Its primitives and standards (concurrency, error-handling, context, etc) are very powerful, but also not the best solution for every type of problem, often they make the code more verbose for little benefit (go routines vs async/await is the main example I can think of).

What is REALLY nice though is that the language takes its primitives to heart, the standard library uses them and most open source projects all kinda use the same primitives and in the same ways. You don't see that in most languages, for example Java has tons of ways of doing concurrency (even within the standard lib) and each lib you use might do it in a different way which leads to a lot of library-wrapping code required when your application uses a lot of libs as well as strange bugs due to bad assumptions

So it is great for building low-level focused applications, things that do one thing and do it really well (in my company we implemented a custom network protocol in it for example). But it is not ideal for large applications that has a lot of business logic.

The way I see it golang is a very good language if you write a lot of algorithms, it is a bad language if you write lot of templaty code

Special note on golang dependency management: it is nice it is part of the core of the language, but using code-repositories as the source of truth was not a good idea and causes tons of issues

Re: What makes you enjoy Go lang?

#26

Things I love about it: - gofmt. The fact that it comes with an opinionated formatter means I don't waste time with bikeshedding. - Simplicity. I love how Go just gets out of my way and lets me do my work. I also don't need to worry about crazy abstractions and deep levels of inheritance. - I usually don't need to worry about performance bottlenecks. Go is pretty fast. - Typed. Over time I ended up hating languages l…

> - Typed. Over time I ended up hating languages like Python and JavaScript because of the lack of typing. Typed languages let me catch a large amount of errors at compile-time, and it also serves as documentation.

Funny, I actually think golang typing to be extremely weak and hard to use, especially with all the pointers vs non-pointer values. Typescript is by far the best type system I ever used, but even compared to Java/C#/C++ the golang types are archaic and basic, more akin to ANSI C in power

Yes the types are better than dynamic languages, but compared to modern type systems it is not very good

Re: What makes you enjoy Go lang?

#27

Things I love about it: - gofmt. The fact that it comes with an opinionated formatter means I don't waste time with bikeshedding. - Simplicity. I love how Go just gets out of my way and lets me do my work. I also don't need to worry about crazy abstractions and deep levels of inheritance. - I usually don't need to worry about performance bottlenecks. Go is pretty fast. - Typed. Over time I ended up hating languages l…

Thank you for this comprehensive list, this made me more excited about the language. These were the highlights for me: - Simplicity - Typed - Go-routines - Single binaries (Cross-compilation is just an environment variable) > - Nil pointers. It would be great if there was a way to ensure points will never be nil. Like Dart sound null safety?

I never used Dart, but from the examples I saw online, seems to check out.

Go is more similar to languages like C, where you use a * to declare a type as a pointer. So an int is just a value in the stack and cannot be null, but an *int is a pointer to somewhere in memory and can be null. It would be lovely to have a third option in this list, something like *int for non-nullable pointers and *int? for nullable pointers.

Re: What makes you enjoy Go lang?

#28
I am not an expert in Go but have written code for internal tools for my company and here is what I love about Go:

- I found its syntax to be very easy to pickup compared to other languages. Something about it is so easy at least for me

- It is fast enough and built for http and backend APIs with great library support.

- Single Binary (Not just Go but another plus for me)

- Concurrency

- Error handling. This gets a lot of hate but the simpleton me loves doing if err != nil because I prefer explicit error handling like that.

It is awesome for building lower level/network applications ideally but you could surely build things like REST APIs and even full web apps.

The downside is that if you are looking to build a full Web Application with Front and Backend, you are better off with tested frameworks where Go doesn't shine as much because die hard Go people dont suggest using frameworks in Go even though few exist.

Re: What makes you enjoy Go lang?

#29
post #17
post #16

Earlier quoted context omitted.

This is similar to other types languages no ?

Kotlin is the only statically typed language that has the same ergonomics as Go (that I know of), and even then you need an external dependency.

.NET has System.Text.Json.

I wonder how does it compare to go's implementation

Re: What makes you enjoy Go lang?

#30
post #8

Coming from Ruby: it is fast, and compiled, but still very easy to use. Lacking fancy features and having types and structs is a bonus when it comes to reading other people's code. When you come back to a program that is 5 years old there's very little bit-rot and it recompiles easily. In this regard, the tendency to have everything built in Go (avoiding external OS dependencies) is a plus.

I am Ruby user myself, what made you pick Go instead of like Crystal?
Post reply on HN