5 ms·
I was a Java dev and love using Go now, but I have to say I'm not sure if many of my Ex-Java-Colleagues would like Go. Go is kind of odd in that even when it wa
by liampulles 3y ago
I was a Java dev and love using Go now, but I have to say I'm not sure if many of my Ex-Java-Colleagues would like Go. Go is kind of odd in that even when it was new, it was kind of boring.
I think a lot of people in the Java world (not least myself) enjoy trying to refactor a codebase for new Java features (e.g. streams, which are amazing). In the Go world, the enjoyment comes from trying to find the simplest, plainest abstractions.
- groestl 3y ago> it was kind of boring. As a Java dev, I love boring. That's why I picked Java. Boring means less outages. > find the simplest, plainest abstractions. Not sure I'd give that medal to Go.
- techdragon 3y agoWhen did go get abstractions? (Only half joking) Isn’t the entire language designed explicitly to prevent programmers from building their own sophisticated abstractions that could confuse other programmers who don’t understand that other persons code… as I understand it, if you can read go and understand basic programming you should be competent with go, and if you know your algorithms you should be proficient. I hated old Java but the modern language isn’t as bad now some people have added some better syntax shortcuts the libraries are nearly twenty years more polished, and the IDE can nearly half write my code for me so the boilerplate and mind numbing aspect isn’t so bad… I loathe go because using it feels like programming with my hands tied behind my back trying on a keyboard with sandpaper keycaps, despite that, I didn’t bother “learning” go, I could just read it based on my Python/C/Basic/Java/C# experience instead of needing any extra learning.
- zozbot234 3y agoK8s just so happens to be coded in Golang. A quick look at that overall codebase should be enough to disabuse people of this notion that Golang developers cannot possibly come up with confusing or overly sophisticated abstractions.
- vasac 3y agoMaybe because k8s was originally written in Java ;)
- plorkyeran 3y agoMy experience with reading Go is that the language not giving tools to build good abstractions has failed to stop developers from trying to do so anyway. There's never a line of code where I just plain don't know what's even going on syntactically as some languages can have, but understanding what it's actually doing can still require hopping through several files.
- valenterry 3y agoIn short: a simple (programming) language does means that every small part/line is simple. But it doesn't mean that the combination of all parts/lines is simple. Rather the opposite.
- cryptos 3y agoVery true! I think a lot of the accidental complexity of early Java systems were rooted in the not so powerful language. If the language is too powerful (like Scala 2) developers do insane things with it. If the language is not powerful enough, developers create their own helpers and tricks everywhere and have to write a lot of additional code to do so. Just compare Java streams with how collections are handled in Go and scratch your head how someone can come up with such a restricted language in this century.
- groestl 3y ago> and have to write a lot of additional code to do so. And most importantly: you have to read a lot of code like this, and understand it's assumptions, failure modes, runtime behavior and bugs, which are different every time. Instead of just reading "ConcurrentHashMap", and be done with your day.
- sidlls 3y agoEh, not really. Go’s philosophy around abstractions is quite poor. Duck typing begs engineers to create poor abstractions that simply reading a codebase does not necessarily lead to understanding. The bolted-on generics implementation actually makes this worse.
- theshrike79 3y ago> As a Java dev, I love boring. That's why I picked Java. Boring means less outages. This is why I personally love Go too :) There's very little room for fancy tricks, in most cases there is just one way to do things. It might be verbose, but writing code is the least time consuming part of my job anyway.
- Someone 3y ago> Go is kind of odd in that even when it was new, it was kind of boring. Java was designed to be boring, too. That’s why, for example, it doesn’t have unsigned integers: it means programmers need not spend time choosing between signed and unsigned integers. It evolved away from that.
- brabel 3y agoYeah, Java has been trying to add every feature under the Sun recently and it's definitely not a boring language anymore (since Java 21 at least, it's impossible to claim otherwise with things like pattern matching being in the language). As a Java guy, I think this is looking like a desperate attempt to remain relevant while forgetting why the language succeeded in the first place.
- kaba0 3y agoThat’s an absolutely bad take. Java is still very very conservative with every change, and they almost always have only local behaviors, so not knowing them still gives you complete understanding of a program. Like, records are a very easy concept, fixing the similar feature in, say, c# where they are mutable. Sealed classes/interfaces are a natural extension over the already existing final logic. It just puts a middle option between none and all (other class) being able to inherit from a superclass.
- neonsunset 3y agoC# records default to immutability. However, struct records being a lower level construct default to mutable (which can be changed with readonly keyword): record User(string Name, DateOnly DoB); // immutable record struct Cursor(int X, int Y); // mutable readonly record struct Point(int X, int Y); // immutable
- brabel 3y agoHey, what the hell? It's not a bad take , it's my opinion. Go with your absolutism somewhere else.
- 3y ago
- resource0x 3y agoAlmost every golang program I've seen was ugly. It's strange given that they designed the language from scratch with all the ugliness ingrained in its structure from day one.
- geodel 3y agoDifferent people different taste, different context, different standards of beauty. Only thing strange seems here is you are putting opinion as some kind of fact.
- resource0x 3y ago> Different people different taste, different context, different standards of beauty. Every statement about aesthetics is subjective, you don't have to remind me of that. BTW, what did YOU write about Amazon shows 6 days ago? No one was pontificating about your opinion, right? Please repent :-)
- davewritescode 3y agoWorking with deeply nested data structures in Go is still frustrating, it’s one place where the Java still wins thanks to the streams API.
- kaba0 3y agoThere are no area where java would fare worth than go.