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

Java has an equals() method. What features are you thinking of?


- Type safe enumerations

- Generics (lets see if flyweight design actually makes it)

- package names that don't depend on source locations

- binary packages for proper encapsulation and even faster builds

- both points together allow for components eco-system to thrive

- more knobs to turn on when performance matters

- a proper graphical debugging experience


I was really thinking about the problem described by GP. But in any case:

- Type safe enumerations - Generics (lets see if flyweight design actually makes it)

I'll give you both those. Generics would be the killer feature for me.

- package names that don't depend on source locations

Java package structure mirrors the file system, no?

- binary packages for proper encapsulation and even faster builds

Go package binaries are cached after build. In any case, build speed is rarely an issue for Go.

- both points together allow for components eco-system to thrive

One of the most impressive thing about Go IMO is the speed at which the ecosystem has grown and is growing.

- more knobs to turn on when performance matters

I have found it takes a lot longer to reach the need for performance knobs in Go than in Java.

- a proper graphical debugging experience

Not sure what you mean by "proper" and why it has to be graphical, but VSCode + Golang extension gives me enough insight into what's going on under the covers at debug time, equivalent to eg Eclipse + Java debugger.

Just for the record, I love Java and have been programming in it for over 20 years. It has many great features and the ecosystem is unsurpassed.

Go is a much more practical language though IMHO. The time to value is much shorter. Setting up a module project is one command. Writing & running tests, complete with coverage and performance, is supported out of the box by the basic "go" command. The standard lib is broad and deep. And as mentioned the ecosystem is growing fast.


> Java package structure mirrors the file system, no?

No, it mirrors the directory structure, from import location, without any reference to DNS servers or source code repositories.

All in all Go is a Java 1.0, with all plus and minus that it entails.


Just want to point out that Go can also be used without dealing with DNS servers and repos in a similar way to Java.

The big difference is you have to place the code in the $GOPATH with the right directory structure and disable mod (GO111MODULE=off)




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

Search: