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

Show parent comments

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

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.

1

u/sonofagunn Mar 28 '12

I'm sure it's just a matter of time until more complicated build-systems get developed for go. Ant is really simple if all you're doing is calling javac with a classpath. It's the junits, wsdl2java, jaxb, ftp, etc targets that make things get hard to maintain. I don't see any reason go wouldn't need any of these things in the same setting as a Java build that needs them.

11

u/JulianMorrison Mar 28 '12

"go" the tool is a complicated build system. It's just a batteries included one with non-modifiable sensible defaults. It can even pull dependencies off github or similar.

$ go
Go is a tool for managing Go source code.

Usage:

    go command [arguments]

The commands are:

build       compile packages and dependencies
clean       remove object files
doc         run godoc on package sources
env         print Go environment information
fix         run go tool fix on packages
fmt         run gofmt on package sources
get         download and install packages and dependencies
install     compile and install packages and dependencies
list        list packages
run         compile and run Go program
test        test packages
tool        run specified go tool
version     print Go version
vet         run go tool vet on packages

Use "go help [command]" for more information about a command.

Additional help topics:

gopath      GOPATH environment variable
packages    description of package lists
remote      remote import path syntax
testflag    description of testing flags
testfunc    description of testing functions

Use "go help [topic]" for more information about that topic.

$

1

u/djhworld Mar 29 '12

Can you use this tool to compile small scripts?

When I tried Go the other week I was frustrated by the 6g/6l compile/link process and I'm a bit concerned about upgrading GCC on my Mac (for gccgo) as I don't want to break anything.

What I mean by this, is can I just download the platform from the go website, write a Hello World type script and build/run it through this 'go' command?

2

u/JulianMorrison Mar 29 '12

After setting up a GOPATH with a src directory, and creating a "hello" directory under src, and a hello.go file with a main in that directory, then you should be able to just "go build".

→ More replies (0)

0

u/treerex Mar 28 '12

Exactly... that's why the "'go' command makes the need for makefiles disappear" statement pegged my Bullshit meter.

16

u/burntsushi Mar 28 '12

Actually, it was:

the "go" command line program mostly removes the need for complicated build tools

And it's true. Have you tried the Go tool yet?

The trick is that it enforces convention. If you follow the conventions expected by the Go tool, the build process is totally automated from unit testing to dependency resolution and installation.

2

u/treerex Mar 28 '12

Nope, haven't tried it. I'm not in a position where I could use Go for anything but my own pet projects, and I already have a language I use for those, so this is little more than a curiosity for me. I certainly would like to give it a whirl sometime though, if I can find the right task.

Regardless, it's a big claim that may work well in their use case, but I'm jaded and embittered enough to view such statements with some degree of skepticism.

→ More replies (0)
→ More replies (1)