Ask HN: New OSS Projects: Go or Java?
12 comments
I think you should decide what your single most important goal is:
1) launch a project
2) learn a language
Learning a new language will derail your project completion and launch indefinitely, often permanently.
1) launch a project
2) learn a language
Learning a new language will derail your project completion and launch indefinitely, often permanently.
This is actually a great point.
Totally. IMO it's equivalent to deciding whether to write a book in your native language or in another language you don't speak because they have more words in the domain of the book's topic.
You wrote this in English? What kind of comment-writer are you? English has so many spelling inconsistencies and homonyms it's a wonder that anyone can understand anyone else. Everyone knows that real authors write in Spanish. Neruda, Borges, Márquez. Spanish's clear pronunciation rules, elegant conjugations, and separation of mutable state (`estar`) from immutable state (`ser`) ensure you'll never run into any dangerous misunderstandings. Consider this sentence:
Better interpretation, pronunciation, efficiency. Why are you not writing Spanish today?
"¡Hola, mundo!"
Note that the sentence is one character shorter than the corresponding phrase in english (`"Hello, world!"`) - this kind of efficiency is quite common when you write in Spanish. Also note that the extra space won by removing a character was then used to add a pre-exclamation flag (`¡`). This flag is a neat optimization to ensure that the interpreter knows to prepare for an exclamation ahead of time.Better interpretation, pronunciation, efficiency. Why are you not writing Spanish today?
> What do folks think - should I build it in Java or Go?
There is an old quote that when people ask for advice you should carefully figure out what they want to hear and then tell them that.
In this case even more so: if you are starting an open source project I'd strongly recommend optimizing for long-term motivation. Whatever that means in this case I'm afraid I cannot tell.
> Would you prefer to contribute to a Java or a Go codebase?
I personally would have a way simpler time contributing to a Java project than a Golang project.
There is an old quote that when people ask for advice you should carefully figure out what they want to hear and then tell them that.
In this case even more so: if you are starting an open source project I'd strongly recommend optimizing for long-term motivation. Whatever that means in this case I'm afraid I cannot tell.
> Would you prefer to contribute to a Java or a Go codebase?
I personally would have a way simpler time contributing to a Java project than a Golang project.
I was wrestling with the same question a few months ago and ended up choosing Scala! I got to learn something new but could still fall back to things I liked about Java.
The most important thing is to use the right tool for the right job. If the project has networking and doesn't involve building a GUI or graphics, then Go is a great choice. (Not that Go can't do GUIs or graphics, but there aren't very robust and mature libraries for those things yet).
Does Go do networking better than Java?
[deleted]
Go's standard library is pretty nice.
I know that Java's standard library is very complete. I know very little about Go's, but I presume that it's not more complete than Java's. Is Go's library easier to use than Java's? Is it significantly easier?
Go is through it's integrated support goroutines (green-threads) very efficient at IO, while still presenting it in a traditional fashion (like blocking IO).
Java can also be very efficient, but only provides the lower level NIO library out of the box. To use that you either have to build und understand a lot of components for yourself (e.g. an IO Reactor, timer handling, etc.) or include one of the bigger frameworks for this purpose (e.g. Netty).
Java can also be very efficient, but only provides the lower level NIO library out of the box. To use that you either have to build und understand a lot of components for yourself (e.g. an IO Reactor, timer handling, etc.) or include one of the bigger frameworks for this purpose (e.g. Netty).
If I did any UI pieces it would probably be in React talking back to an API handled by the core server.
Java's networking capabilities are rock solid, battle-tested and have got very fast as it is used in many heavy duty back end systems all over the world
Get to read so much good about Go and I want to try. But then you see the syntax of Go - its plain-ugly - why ?
plain-ugly is a lot better than unclear-ugly
What qualifies as unclear-ugly ?
This:
$,="\t"; print readlines.map{|r| s=r.split; [s[0].to_i,r]}\
.max{|a,b| a[0]<=>b[0]}
It's a ruby one-liner that prints the largest first field and the lines that contains that field.[deleted]
Being too clever for your own good and writing wonderfully elegant code that randomly breaks on some other engineer who doesn't know you long after you have left the company. Surprise tire fire!
Java ;)
Between Java and Go, definitely Go. I think you'll find it surprisingly easy to learn, although a bit constraining compared to Java.
OTOH, if the project will require heavy loads you might want to consider Phoenix/Elixir. That's would be learning something truly different too.
OTOH, if the project will require heavy loads you might want to consider Phoenix/Elixir. That's would be learning something truly different too.
Given the scope of the question, if you are thinking about creating something useful in the OSS space, then I would clearly recommend to start with Java since you would be laying the foundation of the project in a language you know.
Otherwise pick Go.
Otherwise pick Go.
personally if I were you I would use this as an excuse to learn Scala especially as you have a Java background.
What's the nature of your project? If you want people to use it and maybe create a community around it, the language might play a big role.
My impression is that Java is used by enterprise and more established sectors, whereas Go is popular with hobbyists and early adopters.
My impression is that Java is used by enterprise and more established sectors, whereas Go is popular with hobbyists and early adopters.
I tried to start another project in Go instead of Python/Flask. I never really started.
If you want to learn, Go is a good choice. If you want to get things done, use what you already know.
If you want to learn, Go is a good choice. If you want to get things done, use what you already know.
How about C?
whether you want to ship or you want to learn more?
Since I'm hoping others in the community will want to contribute, I thought I'd ask here before making a decision.
What do folks think - should I build it in Java or Go? Would you prefer to contribute to a Java or a Go codebase?