
Ask HN: New OSS Projects: Go or Java? - kt9
I&#x27;m thinking of working on building something new and open sourcing it. I know java really well so my first choice is to build it in java (pure java - no J2EE or other bloat) but Go also looks like a great alternative. Plus I&#x27;ll have an excuse to learn Go.<p>Since I&#x27;m hoping others in the community will want to contribute, I thought I&#x27;d ask here before making a decision.<p>What do folks think - should I build it in Java or Go? Would you prefer to contribute to a Java or a Go codebase?
======
benologist
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.

~~~
kt9
This is actually a great point.

~~~
rplst8
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.

~~~
lord_braleigh
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:

    
    
        "¡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?

------
reitanqild
> 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.

------
tylerpachal
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.

------
pbohun
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).

~~~
AnimalMuppet
Does Go do networking better than Java?

~~~
perfmode
Go's standard library is pretty nice.

~~~
AnimalMuppet
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?

~~~
Matthias247
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).

------
samblr
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 ?

~~~
mrits
plain-ugly is a lot better than unclear-ugly

~~~
samblr
What qualifies as unclear-ugly ?

~~~
atmosx
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.

------
transfire
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.

------
gazarullz
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.

------
softinio
personally if I were you I would use this as an excuse to learn Scala
especially as you have a Java background.

------
pesfandiar
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.

------
iurisilvio
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.

------
_RPM
How about C?

------
tuananh
whether you want to ship or you want to learn more?

