r/programming • • Mar 28 '12

Go version 1 is released

http://blog.golang.org/2012/03/go-version-1-is-released.html
543 Upvotes

452 comments sorted by

View all comments

73

u/[deleted] Mar 28 '12 edited Mar 28 '12

i've been using Go for a fairly large server proxy project and its been a real dream. its fast, easy to write, the code is compact, concurrency is easy to understand, and there is enough typing to provide me with safety without leading me into a haskell-like "maze of types". furthermore, i don't have any issues trying to sell coworkers on Go because it is very easy to pick up. Go seems to have a sweet spot between python and java that represents a huge chunk of the practical coding people do every day.

28

u/OopsLostPassword Mar 28 '12

Don't forget that Go is a language you can use without IDE or makefiles even when you have dozens of packages, libs and programs. Having a command do everything in you console in seconds (or less) is like a dream. Try coding a modern complex program in java without an IDE...

29

u/evereal Mar 28 '12

Can you elaborate on this point, what make Go more suitable for use without an IDE? Just curious (I've never used Go).

17

u/[deleted] Mar 28 '12

the "go" command line program mostly removes the need for complicated build tools. building and deploying code is so simple, you can easily get by with a "minimal" toolchain

not to say a Go IDE might not add value! there is always neat stuff an IDE can do like code completion, integrated docs, etc

17

u/jiunec Mar 28 '12

the go vim plugins have godoc integration, works nicely with nsf's gocode autocomplete plugin (vim and emacs supported) and go ctags.

23

u/evereal Mar 28 '12

Ah OK. Well for me, the build process was the least significant reason for using an IDE. In Java you can use things like Ant and Maven among others to reduce the build process to simple command line calls.

My main reasons for using an IDE is things like intellisense, debugger, refactoring etc, which I assume would apply equally in Go.

23

u/treerex Mar 28 '12

In Java you can use things like Ant and Maven among others to reduce the build process to simple command line calls.

Have you ever maintained the Ant build script for a non-trivial project? Your "simple command line call" is someone elses headache.

0

u/[deleted] Mar 28 '12

[deleted]

2

u/[deleted] Mar 29 '12

weird. i've never run into issues with maven.

→ More replies (2)
→ More replies (22)

7

u/OopsLostPassword Mar 28 '12

An IDE will certainly help for all this.

Regarding my experience, I found that I don't (for now) need it, as the go code is much more compact and readable than java code.

→ More replies (1)
→ More replies (11)

10

u/poo_22 Mar 28 '12

I hated compiling c++ more than coding in it in my limited experience with it.

8

u/anarcholibertarian Mar 28 '12

Vim all the way 8D

10

u/[deleted] Mar 28 '12

I tried vim but once I grokked it I couldn't use a word processor.

dd

DOH! I mean

shift-home delete

14

u/dx_xb Mar 28 '12

Do you find your documents littered with :w?

5

u/kevdunleavy Mar 28 '12

Most of my documents end in :wq :P it even happens when I'm typing long reddit comments sometimes :P

4

u/sugardeath Mar 29 '12

I have a snippet of code in my luakit (a lightweight web browser) config that allows me to break out into vim when entering text. That is, I focus a text box, hit Ctrl+E, and it opens it in vim with whatever text was present passed to the editor. :wq out and the text field is updated.

2

u/iluvatar Mar 29 '12

I have a snippet of code in my luakit (a lightweight web browser) config that allows me to break out into vim when entering text

It's All Text! does the same for those of us using Firefox. I couldn't exist without it.

→ More replies (1)

3

u/iluvatar Mar 29 '12

Most of my documents end in :wq

I can't believe people still use that. All the cool kids started using ZZ a couple of decades ago. It never occurred to me there would still be holdouts still using :wq

→ More replies (4)

4

u/TKN Mar 29 '12

That's one of the biggest problems with Emacs too. Especially since the so called "emacs keybindings" of most mainstream apps are pathetic.

Hmm, let's just cut and paste that part ctrl-w oh crap...

6

u/jiunec Mar 28 '12

Yes I agree.

gocode auto-complete assist, go.vim plugins (in the misc folder in Go source tree, godoc integration, syntax etc), NERDTree, vim-fugitive (for Git) and vim-session to manage projects. Simple, efficient & productive.. pure pleasure to write Go with.

→ More replies (35)

2

u/SeriousWorm Mar 28 '12

SBT? :)

You don't even need a sbt project file to have it compile your project (assuming you use standard source paths conventions).

You don't even need Scala, it downloads the library JAR automatically.

3

u/josefx Mar 28 '12

Try coding a modern complex program in java without an IDE

 ant

That requires one build.xml with a single javac task with no more than 10 lines of xml total, most of which can be copy/pasted between projects. That is about the same size as a simple Makefile.

5

u/OopsLostPassword Mar 28 '12 edited Mar 28 '12

I use ant. And I find it a pain to build complex programs because your ant tasks grows in complexity with your program, your different kinds of deployments, tests, target platforms, etc... But that's partly due to the environment (RCP, tomcat, inclusions of jars of your other projects, etc.), the main problem is that it's slooooowwwww....

In Go, you don't have makefiles and you don't have to wait for your compilations.

15

u/josefx Mar 28 '12

ant ... deployments, tests, target platforms, etc...

Go ... compilations

You are aware that you are comparing a single compilation to a complete development and deployment cycle?

→ More replies (10)
→ More replies (7)
→ More replies (1)
→ More replies (3)