Golang – when programmers had smaller egos
wired.com
wired.com
The entire point of Go is to be the Java of Google, the language you don't need several weeks of training for to be productive in and start reading and writing code.
Java's problem is that it doesn't do this well for anything but heavy business logic applications, and the more clever the programmer, the more they can build up complex structures. Go counters this by not having complex structures and forcing you to consider every failure case (at least until writing "if err != nil" becomes second nature) while also having a better (but not perfect) API surface for writing the kinds of applications important at Google (network heavy, distributed systems, performance focused).
Java has very simple OOP constructs (classes, interfaces, inheritance, simple generics) which everyone supposedly know already in industry. Golang from another hand implemented unorthodox solutions, which actually require some learning curve (e.g. how to model stuff without inheritance and generics).
But also, the Go spec is a couple of pages and the Java spec is, uh, it's taking a while to load for me... ah yes, 876 pages. How's that learning curve?
sure, if go would be popular in enterprise dev, we would see magnitude more error handling spagetti and genericless copy-paste code in go
> But also, the Go spec is a couple of pages
I think you undermeasured it by 20 times. Also it is very possible that golang spec is much more shallow. But anyway, I don't think one need to learn java spec to learn the language.
You have to admit, there’s something appealing about being able to read the entire spec for a popular, performant, production language over a lunch break. You don’t need to read and/or master a language’s specification in order to use it. But at 130 pages, you can.
[0] https://go.dev/ref/spec [1] https://docs.oracle.com/javase/specs/jls/se23/jls23.pdf
you are probably programming language enthusiast, but I am not, I have long list of other things to read..
Java-style OO has a place, but it’s not always a perfect fit. Java, C#, and arguably C++ have taken a kitchen-sink and grafted any and all constructs found in other languages so long as they look remotely useful. The result often is useful, but it also results in a more complex language.
While Go isn’t a perfect language, nor is it a great language, I /have/ found it to be a productive language in ways that Java, python, ruby, etc. are not. I attribute this productivity boost to the simplicity of the language (if not the runtime) and to the conservative approach taken to add new features.
yes, they are unorthodox for this specific niche: enterprise devs, most languages have OOP and most devs know it.
> Java, C#, and arguably C++ have taken a kitchen-sink and grafted any and all constructs found in other languages so long as they look remotely useful.
I disagree with you, Java approach was very conservative, and original goal was to have simplified OOP. If you have specific examples: we can discuss.
The point of Golang is Google’s answer to rapidly declining quality of its search results. Golang is the first and only language where faced with problems I would rather read source code of library then frantically search for solutions in Google…
That's a different thing from the ego of gophers. Gophers believe they are superior at programming conventions because they know Go. They have a real "holier than thou" concept. In reality, modern programming languages are fine, and not that interestingly unique...
- those who’ve worked with go fulltime for a few months
- those who haven’t
looking back at the go i wrote in my first weeks after dropping python, it is very different from the code i write now.
go is imperfect, but fantastic. hard to hold any other view without being in the latter category.
mostly what changed is the way i read code. if err != nil is a friend now, not the abomination i first thought it was.
1. https://github.com/nathants/s4/blob/15eb67158cdc03ee1983d060...
2. https://github.com/nathants/libaws/blob/affb1d6002250e35c5ba...