Page 1 of 1

Go language

Posted: Tue Apr 03, 2012 12:15 am
by USCode
Has anyone spent some time experimenting with the Google Go Programming Language: http://golang.org/ ?
It recently officially went to version 1.

Re: Go language

Posted: Tue Apr 03, 2012 1:07 am
by IdeasVacuum
I haven't used it - my first reaction was, it's Google, let's wait and see if they continue it's development or dump it and move on to something else. Well, it looks as though they are actually producing an innovative language that is both easy to use and is as modern as more recent hardware. They still have much work to do but it looks like Go is here to stay.

Re: Go language

Posted: Tue Apr 03, 2012 6:12 am
by KJ67
I started looking at it a few days ago.

My first impression is that it has potential, gothread are performing like Erlang as long as your on a single computer and the channels are nice & easy to use. But, after writing a little test codes I start to really miss a working IDE that keeps track of syntax and the names of any procedure.

Compiling if fast and the result is not too bloated (accepting all the framework that are included). "Hello World" ends up like 1.2 Mb, but more complex programs seems to grows slower.

It has clear potential. But version 1 is nothing I would try to use more serious today, the setup I ended up with (Notepad++ with go's included syntax highlighting & compiling from the console) feels too much like being back hacking ANSI C-code in 1988...

Give me a reasonable GUI and I may come back, but for now its not for me.

So for the language itself, a strong 4/5
The complete package, maybe 2/5

Re: Go language

Posted: Tue Apr 03, 2012 7:11 am
by xorc1zt
auto completion for vim, emacs and others : https://github.com/nsf/gocode
sublime text plugin (rely on gocode) : https://github.com/DisposaBoy/GoSublime
eclipse plugin : http://code.google.com/p/goclipse/
golang ide : http://code.google.com/p/golangide/

Re: Go language

Posted: Tue Apr 03, 2012 11:31 pm
by Blood
USCode wrote:Has anyone spent some time experimenting with the Google Go Programming Language: http://golang.org/ ?
It recently officially went to version 1.
I tried go but the lack of parenthesis put me off the syntax. I prefer the D language instead.

Re: Go language

Posted: Wed Apr 04, 2012 1:39 am
by fsw
Blood wrote:I tried go but the lack of parenthesis put me off the syntax.
You can add parenthesis in IFs and FORs if you want to.
(if this is what you are talking about...)
Actually you can add them every where you want...
Blood wrote:I prefer the D language instead.
I just went the other way around.
Started looking into D years back and wrote ~50K of useful code and now I get somewhat annoyed:

After all these years:
GDC is unusable on Windows - DMD compiles my program just fine but GDC does not (newest version)

There will be no DMD for 64 bit Windows. So on 64 bit Windows GDC it is.

The language seems to shift and loose the easy syntax that D v1 had.
Sure they tried to fix things, but every time I look at some D v2 code it get's more complicated and weird.
(especially with complicated code, duh...)

Maybe the major problem of D is that it tries to be all things to all people - and with that it satisfies no one completely.
(except the people involved in the compiler/language)

Go seems to go the other way and tries to simplify the needed syntax - especially for complicated code.

The compile time is very, very fast compared to C++ or GDC (DMD is acceptable but still way slower than Go) .
It is already used inside Google on different projects which tells you something about the state of the compiler.

Compiling is easy just do:

Code: Select all

go build hello.go
And it creates a hello.exe

The smallest possible hello world program is ~200kb (64 bit) if the internal printf is used.
With fmt.Printf the size grows to ~1.2mb (64 bit) because of the runtime.

But even with D a program with ~50K of code compiles with DMD now to ~500kb (32 bit) and it used to be ~1mb a few versions back (depending on the library functions used)

Last weekend I bought a e-book as PDF (The Way To Go - 629 pages -$3.99) about Go and started reading it whenever I can.

BTW: Go is BSD licensed and the "Google" name is not in the code - they left it out.
Also (as with D) more and more people from the outside are involved in it.

Maybe when I'm done with the book I will find out that Go doesn't suit me, but for now I'm pleased.
Ask me again when I wrote ~50K of useful code in Go :mrgreen:

Re: Go language

Posted: Mon Apr 09, 2012 11:33 pm
by USCode
Some folks here have touched on one of the key reasons why PB appeals to me and why Go is interesting: quick compilation.
You can write some code and test it quickly without waiting for a lengthy complile-link cycle.
I guess the key problem here with Go for many folks is the lack of an integrated IDE for Go.

How about the standard go package library? How does it compare to PB's?

Re: Go language

Posted: Mon Apr 09, 2012 11:55 pm
by xorc1zt
USCode wrote:Some folks here have touched on one of the key reasons why PB appeals to me and why Go is interesting: quick compilation.
You can write some code and test it quickly without waiting for a lengthy complile-link cycle.
I guess the key problem here with Go for many folks is the lack of an integrated IDE for Go.

How about the standard go package library? How does it compare to PB's?
you should try smalltalk, python or common lisp. with those languages you can code and modify your program while running.

http://en.wikipedia.org/wiki/Read%E2%80 ... print_loop

Re: Go language

Posted: Tue Apr 10, 2012 12:29 am
by skywalk
And VB6 also... :wink:
This is a powerful feature in rapid prototyping.
Of course, a fast compiler is preferred for end use.

Re: Go language

Posted: Tue Apr 10, 2012 12:39 am
by USCode
xorc1zt wrote:you should try smalltalk, python or common lisp. with those languages you can code and modify your program while running.

http://en.wikipedia.org/wiki/Read%E2%80 ... print_loop
I've looked at those in the past, no thanks. I didn't explain myself very well, my point was you get a compiled native executable with good speed and no interpreter required.
With the rapid compilation you can recompile your app and have the executable up and running for testing as quickly as those other systems take to start the interpreter.

Re: Go language

Posted: Tue Apr 10, 2012 1:45 pm
by xorc1zt
haskell and common lisp can produce native executable, you just need to start the repl one time and when you have done your work you compile the code. haskell is faster than go when clisp from steelbank is a little slower.

http://www.sbcl.org/
http://www.haskell.org/haskellwiki/Haskell

Re: Go language

Posted: Sat Sep 14, 2013 7:42 pm
by USCode
The Go standard library has gotten to be pretty comprehensive:
http://golang.org/pkg/