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

Well as someone that has been developing software in Java for 20 years and never touched Go; it's the other way around.


I developed and maintained Java software professionally for over 20 years, since 1.0, but now I work in Go. There is no way I’d willingly go back to Java, and these examples really underscore some of the reasons.

I do however wonder, now, what I’m missing out on with other languages, particularly swift and rust.


Swift has great support for enums (and ADT in general). That's about the only thing i miss when i switch from swift to go. Generics and protocol oriented programming is nice, but the ergonomics makes it still not that enjoyable (you start banging your head against walls pretty quickly beyond the most simple examples).


Rust has a great, Haskell-inspired way to create algebraic data structures (with the enum keyword). These same structures can be very nicely destructured and pattern matched on.


Can you elaborate? I mean there may be some new operators and concepts in the Go versions, but they're explained succinctly in https://go.dev/tour/


Java is a similarly small language, with perhaps even less of a learning curve.




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

Search: