views:

11390

answers:

60

I've just been told about a new programming language, Go, developed at Google by such notables as Ken Thompson and Rob Pike. Does anyone have any experience with it so far? What are your thoughts about how viable small- and large-scale applications could be developed with it?

Relevant links (thanks to Lance Roberts; feel free to update these as necessary):

+20  A: 

Links:

Ars-Technica

PC World

Google Open Source Blog

Tech Talk Video

Go with Google - Yet Another Language!

Getting started with Google's Go

Lance Roberts
You should add the tech talk: http://www.youtube.com/watch?v=rKnDgT73v8s
hasen j
Got it, thanks.
Lance Roberts
and Go with Google - Yet Another Language! http://www.i-programmer.info/news/98-languages/909-go-with-google-yet-another-language.html Getting started with Google's Go http://www.i-programmer.info/programming/other-languages/912-getting-started-with-googles-go.html
mikej
@mikej, thanks, got it.
Lance Roberts
+6  A: 

When I read about it I see a lot of inspiration from Python (a language I like) although I can't see it mentioned explicitly as an inspiration.

  • No inheritance or explicit interfaces; interfaces are duck typed (but checked at compilation) makes for something very interesting!
  • mapping type is part of the language, map, reminds me of Python's very powerful dict.
  • Array slice syntax a[1:3], and you query a collection's length with len(m)
  • Acknowledgement of coroutines
kaizer.se
It's difficult to see what is so Python-specific about those points.
Kinopiko
@Kinopiko: I don't use the word specific anywhere.
kaizer.se
If you claim these features are taken from Python then perhaps it seems as if are claiming that these features are specific to Python.
Kinopiko
They aren't duck typed, but just checked for. Duck typing is for dynamic languages.
Dykam
@Dykam what is your definition? I think this fits pretty well with duck typing: The interface is just declaring the methods.. no need to specify which interface a type implements or so, in go. I don't see why its exclusively for dynamic languages, but if you can force that into the definition, you are right -- it's not duck typed. These are not exact parallels, it is just similarities.
kaizer.se
The wiki page about Duck typing says me it is a dynamic language feature.
Dykam
+4294967295 for coroutines
Longpoke
Go looks to me to be pretty heavy in syntax. That's anything *but* Python-inspired.
jae
jae: Python is more than just the syntax. I didn't say it took all, or even much from python.
kaizer.se
+4  A: 

Yet another programming language. It doesn't at first look seem to provide any major breakthroughs in terms of either productivity or performance.

I am just not sure in what situations using it would be appropriate except for perhaps small personal projects.

From looking at the basic tutorials it seems to simply be a new replacement for c in the same way c++ and objective-c replace/extend c.

corydoras
+2  A: 

This language, as Rob says in the google tech talk is meant as a systems language. Realistically the number of true systems programmers in the dev ecosystem is probably less than 5% of the whole. Dont get me wrong, I LOVE the fast compile time etc but what is needed is a language that is simple, that reduces the complexity of the development process. I dont know that there is a silver bullet. I think Ted Neward hit the nail on the head in a discussion about Agile - "We are in desperate need of simplicity in this industry. Whoever gets that, and gets it right, defines the "Next Big Thing"." I think that in that context GO is yet another language and not the next big thing we are looking for.

http://blogs.tedneward.com/2009/10/12/quotAgile+Is+Treating+The+Symptoms+Not+The+Diseasequot.aspx

keithwarren7
The other 95% being web development? Hook Go up to a database, throw together a nice support framework and *pow* you have your PHP killer.
Thomas
+110  A: 

I just feel that it is yet another language. Nothing really special about it except that it is new and is far from mature. We'll have to see.

Sergio Tapia
Most languages created today are created to compete with functional languages (haskell, F#) or scripted languages (ruby, python). This is the first new language looking to compete with something as low level as C.
vanja.
I got the impression that it was more in competition with Java/C# than with C.
MAK
@vanja, Actually D tried it before (still trying, too)
hasen j
One word - channels! Occam rises again :)
Martin Thompson
I think the incredibly fast build times, the promise of latency free garbage collection, built in concurrency and multicore/processor support with only a 10-20% overhead over C makes this language special. How can you not see the value in that? I think it's special, albeit immature and experimental
Pierre-Antoine LaFayette
@Pierre, that sounds remarkably like C#/.NET :o
280Z28
Be beware of the fact that the *current* .NET GC ain't latency free. Same for Mono's current GC. Though .NET's gets a new GC.
Dykam
Same for Mono though, but the new GC for Mono won't be latency free either.
Dykam
And sounds more like Parallel C#/.Net :D.
Dykam
I just thought it funny how Rob kept going out of the way to avoid mentioning C#/.NET
keithwarren7
If you read carefully, GO's gc isn't latency free either. They have merely promised to have a latency free GC "soon"
Breton
@hasen j - I'm not convinced. D has so many language features and utility libraries built in. Feels more like a competitor to C++ than C.
vanja.
Looks nice to me. It actually reminds me most about Erlang with the focus on very simple multiprocess programming, but with a more familiar syntax (Erlang is based on Prolog) and conveniences like variables (which Erlang doesn't have). I think it's a great approach for scalable (as in multi-core) programming, vastly superior to Java threads or Ruby processes
j-g-faustus
Looks good. Hope it GOes well.
fastcodejava
What an insipid answer.
Wahnfrieden
This guy doesn't even understand how there is any difference between C# and Java, if you look at his posts.
Wahnfrieden
124 up-votes for an answer than anyone could produce just by guessing?
Andreas Rejbrand
C++ has some problems like that it takes very long to compile.. go addresses some of these. On the other hand also go is slower and some stuff is still missing..
Nils
You'd accept this from a "ASP.Net MVC2" programmer? I don't even know what that drivel is, let alone whether it requires knowledge of computer architecture or languages.
Matt Joiner
+39  A: 

I think the compilation speed is more important that people realize. I don't think it's "yet another programming language." I think it might be a big deal.

I watched the hour long video: http://www.youtube.com/watch?v=rKnDgT73v8s. Before that, I was skeptical.

Nosredna
yes much like D lang, you never realize until you really need it.
kar
I wanted to like D, but it seems like a bit of a train wreck.
Nosredna
I haven't seen the video yet (no time, I tag it for the weekend). I agree that compilation time is important, but don't you think that the more work the compiler does, the better? I mean, compilation flags can help us choose between better code and faster compilation, and when we want better code, we want better code. Also Moore's law is on our side when we want faster compilation. I will have to see the video to see if it's such a big deal.
machielo
You can have an hour long loop counting `2+2`, but is it better?
Jurily
For compilations speeds, take a look at the haXe compiler, it is blazing fast.
Dykam
+1 I was skeptical too until I saw the video: I have always wondered, what would be Rob Pike and Ken Thompson doing at google all this time. now I know!
OscarRyz
If you want fast compilation speed, there are other options - choosing Go just because of that doesn't seem a good choice. Delphi is the obvious candidate (very fast single-pass compiler, and is a more 'normal' language.) C# is okay-ish too.
David M
+1 for watching video first and voicing opinion later.
mizipzor
@mizipzor, obviously, I'd never make it as a reporter on any of the 24-hour cable news channels.
Nosredna
@Machielo: I don't think Moore's law is on our side for compilation anymore (at least for individual source units)--it's pretty hard to parallelize and single cores aren't getting faster anymore. That said, I think compilation speed is a rotten reason to choose a statically-typed language.
Drew Hall
+5  A: 

Sounds like Google's version of Ada, but I won't jump to conclusions just yet. Let's hope the standard won't be 900 pages long.

Jurily
i love ada := operator :) and concurrency facilities. A pity they didn't put a bit more of ruby syntax on the recipe.
fnieto
How would this be the Google version of Ada when ADA is the strongest typed language I've ever known??!!
Jorge Córdoba
@Jorge while I completely agree with you, consider that Ada has built-in concurrency mechanisms (called tasks), array slicing, pointers without pointer math, the concept of packages (although I seem to remember Ada requiring something similar to a .h), and no implicit type conversion. These are all characteristics of Go.
San Jacinto
+18  A: 

First thought: wow, D done right! Proper mix of Python and C.

After watching the TechTalk:

  • Syntax is a bit ugly (could be prettier)
    • Don't like := syntax
    • You still need for i = 0; i < 10; i++?? seriously?
    • Too many braces, stars, ampersands.
  • The interface thing is brilliant! Can't wait to use it.
  • The channel concept is interesting, not sure what to think about it though.
hasen j
I've seen the idea for the way they did interfaces before when discussing various OOP languages' shortcomings. But this is the first language I've seen that does it. So not brilliant so much as first to market.
jmucchiello
At least it's not Interger::Iterator::non_constant_forward i=Interger::Iterator::begin() ...
Martin Beckett
The old ugly for;; is there, but at least there's a "foreach" style for too: `for key,value := range someCollection { ... }`
Grumdrig
I dare you to find something more flexible than the old ugly for.
Jurily
+4  A: 

It gives me an uneasy feel it got the green light out of frustration with the python core performance.

Much in the same way chrome was announced as an alternative to the tragic memory leaks firefox2 was suffering at the time.

If that's the case, too bad it doesn't retain Python syntax.

ZJR
Go is not really an alternative to Python, it's more an alternative to C++/Java/C#.
Alec Thomas
Revisionist history? Firefox 3.0: June 17th 2008.Chrome 1.0: September 2nd 2008.
Breton
You're right. They where coexisting. But I remember I was **still using Firefox 2** at the time of the announce. And was disappointed of firefox behaviour, and had switched back and forth browsers for months. Could be, but here I cannot really recall exactly... that Firefox 3 was **really unstable** until **Firefox 3.1**? I remember 3.1 was a very welcome update, (and kinda heavy, for a .1) not really sure why. Can someone confirm/deny?
ZJR
+60  A: 

Having spent the day wrestling with some tricky BGP parsing in regular old C, and then having spent part of the trip home thinking about what a new systems language that combined the speed and simplicity of C with proper memory management, built-in concurrency support etc. would look like, I read through the Go materials with a good bit of interest. First impressions:

  • I really like multiple return values. You can do that in Perl, sort of, by returning a list.
  • The concurrency model is interesting. I've thought for a long time that this was something that really needed to be built into a language, and Go does it at a basic syntactical level.
  • I don't see anything in the way of built-in containers, other than statically-allocated arrays.
  • I like the rethinking of things like for loops, switches and printf(). Too many languages (I'm looking at you, Java and Perl) simply copy these verbatim from C.
  • Interesting that they took Java's concept of interfaces and divorced it from any kind of type hierarchy.

There's a lot of work yet to be done, but it's among the better candidates for Next Big Thing that I've seen in recent years.

ceo
Well, they do have built-in hash tables (called maps)...
Jeremy Friesner
When *is* the Next Big Thing coming out? Anyone know? I am desperate for it :)
Peter Perháč
"I really like multiple return values. You can do that in Perl, sort of, by returning a list." >> of course, in POC, you can alwas return a struct.
René Nyffenegger
Copying loop constructs, you might include java script and c#. Arguably worse as they're more recent than perl and java.
mike g
The interfaces system actually doesn't come from Java at all. It is actually much more like (or equivalent to?) type classes. http://en.wikipedia.org/wiki/Type_class
Thomas
+1 for concurrency
luiscubal
Re: No containers: Yes they stated that generics are missing and they would like to add them as soon as they decide the correct approach. So right now you cannot create type-safe containers (List<Integer>, Set<String>, etc).
Mark Renouf
Someone else felt the same as you about C, his name was Bjarne and he created C++. SBRM/RAII is the best GC I've ever used! Return boost::tuple. And for concurrency OpenMP is pretty standard across compilers; and though it's definitely not an end all, they are working on concurrency issues like every other language is right now...
joshperry
+31  A: 

A type-safe language with concurrency support, garbage-collection, a succinct C-like syntax and compiles 120,000 lines of code in about 8 seconds on a Mac laptop. The C/C++ edit-compile-link cycle has essentially been "eliminated".

Let's throw in that it was designed by a couple of famous former Bell Lab guys for a little buzz.

Hmmmm....I'd say we have a winner.

Compiling 120,000 lines of code in 8 seconds is a really poor performance.
ntd
Winner? Not till the authors pass the beard test: http://www.codethinked.com/post/2007/12/The-Programmer-Dress-Code.aspx:-)
csl
It's just C/C++ having a amazing slow compilation, other languages compile way faster.
Dykam
Another interesting note - by doing away with some unnecessary and rarely used features and reworking packages and linking rules, Go will allow for much faster automated code analysis
Chris King
One of the authors is ON that beard page you linked to.
nos
There are plenty of options if you want fast compilation (especially if you just want faster than C++, but still want a C++-like language or features.) One of Delphi's big selling points for many years was the speed of its compiler. It's still blazingly fast. Every so often I switch from C++ and write a Delphi program and it's still cool to press F9 (the Run key) and have it just run pretty much immediately. In fact quite a bit of what I've read of Go so far reminds me of what is being done in the Delphi language recently or in its roadmap.
David M
Our 240,000 lines of code C# solution compiles in 7 seconds (on a PC, I have no idea how fast that would be on a Mac laptop ;))
Marek
@Marek: C# compile speed does not count until you include the CIL to x86 compilation step also.
Zan Lynx
+8  A: 

Super-fast erlang for the masses? :) Seriously ... I like the emphasis on concurrency-oriented programming. Also it's important to remember that systems languages are not the same as application programming languages - a much smaller user-base with far more specific needs.

What will be interesting is when the operating system built on Go comes out ... C is to UNIX as Go is to ... ? We'll see. Who was it that said: History don't repeat, but it sure does rhyme?

I don't think it's got out-of-process protocols like Erlang has. But it's probably only a matter of time till it has. Since this is Rob Pike, maybe he'll borrow Styx from Plan9?
csl
That would be Mark Twain: http://en.wikiquote.org/wiki/Mark_Twain#History
Cristián Romo
Go doesn't have exceptions. A huge part of Erlang is its handling of failures, errors and exceptions. They don't really compare on other points than message passing.
I GIVE TERRIBLE ADVICE
+3  A: 

It compiles really fast! See this short youtube video.

Am I the only one that really couldn't care less about compile time? I mean, I don't want to sit there for a week (happened to me a few years ago when compiling KDE on a Pentium 4 1.8 GHz with 768 MB of RAM), but I don't know of any language that I would avoid simply because the compile time was too high. When choosing a language, I'm more worried about things like target platform, code readability, available libraries, etc. I've never even considered compile time.
senfo
+1  A: 

its quite similar to C++, which made me wanna check it out, I think the language is carefully planned, but I still think its too early to be used. Might wanna wait until it gets to 1.5 before I decide whether to study it or not.

trace
+36  A: 

YACL

Yet another C Language. Yet another for syntax. What's the contribution again?

Oh and he broke the cardinal rule of C languages:

If you want your new C-syntax language to succeed, run far far away from any syntax that uses :=

(I am making no judgement on the usefulness of :=. I am simply stating a fact that every adaptation of the C language that has used that syntax has failed to catch on in popularity. See A Modest Proposal: C++ Resyntaxed.)

Frank Krueger
why, the := is one of Go's best features.
Peter Perháč
In virtually all the keyboards I've used, either the = is lowercase and the : uppercase, or the reverse. I type a lot of assignment operators, particularly in C, and find having to type a single operator while changing the shift key status annoying. I hated it in Pascal, about thirty years ago, and I still hate it.
David Thornley
Using the := operator is optional though. It's just a shortcut for variable declaration/initialization, e.g. `x := initialValue;` is the same as `var x = initialValue;`.
Matthew Crumley
So declaring a variable uses the exact same syntax as a fairly common method of assignment? I don't think I like that either.
David Thornley
That is a valid point, although lots of programmers coming from a C-family background have probably never used languages with `:=` assignments. For me, I'd probably just use `var x...` anyway since that's what I'm used to. I don't see much benefit to the slightly shorter syntax.
Matthew Crumley
My delphi IDE is set to auto-correct ';=' to ':=' - I never type ':=' manually. It still annoys me, though.
Blorgbeard
var x = intialValue and x := initialValue are giving me this warm and fuzzy nostalgic feeling for Pascal. :-)
ceo
@David. You should try a Scandinavian keyboard.
Jonas
On my keyboard layout := is on altgr+a and altgr+f, respectively. Its not hard to type. Still dont like it though, why do you need to make assignment a two character command when you do it so much?
mizipzor
@David Thornley: So ... := |= ANNOYING ?
Tim Post
@mizipzor, := is for initialization (and only if you want to leave off `var` and the type), not assignment. You never *have* to use it if you don't want to.
Matthew Crumley
well, <= and >= are widely used, and they have the same shift key problem. I don't see an issue with it.
GSto
<= and >= (and =>) have the advantage that the two characters are typed using two different fingers. := uses the same finger for both characters, which makes it more annoying.
Kyralessa
What are you talking about? I use my index finger for `:` and my middle finger for `=` :D
trinithis
@trinithis: If I did that on my keyboard, I'd be hunting and pecking. On this standard US keyboard, the home position for the little finger is on the ;/: key, and the =/+ key is way to the upper right. Both would normally be typed by the right little finger, which really isn't a good finger to task with combinations like this.
David Thornley
+1  A: 

The initialization :

s:=0;

It would be better if "=" is used instead of ":=" to represent an initializing declaration.

I liked the Minimization of use of parenthesis in "for" and "if" statement

 for i := 0; i < 10; i++ {

  if s==0 {   }
}
Himadri
I like having a separate operator, since it avoids the problem of accidentally creating a new variable because of a typo. It might take some getting used to though.
Matthew Crumley
+11  A: 

I'm really in 2 minds about it. I think I've looked at a large number of languages over the years, loved some, loathed others, always looking for the "perfect" one (where is it??).

I really, really love that people want to try their ideas out. I don't care if it goes nowhere from that POV, but a lot of great products have come from scratching an itch. I'm not really sure that a new language will actually solve things as expected -- it will probably take a lot of time and effort to shake-out those niggly bugs and issues, especially as it's meant to be a close-to-the-hardware language (isn't it?).

These days, I've come to the conclusion that no single language will adequately solve any problem, and people should use several languages together for several types of systems -- e.g. C for low-level/very-fast "driver" code, wrapped by a TCL/Perl/Ruby/Python glue language. Maybe with an Erlang/Scala back-end MQ service, and a Haskell parser/DSL for the less technical to write their plugins/snippets/blah.

I don't know, that example's very made-up, and I know there are a lot of folks who hate the idea of learning a new language, but it does annoy me that so me teams, companies and corporations are still so badly afflicted with tunnel-vision over languages.

Will
+10  A: 

Hello World compiles to a bit over 500KB on a linux machine. How will a system designed by this look like where simple tools are half a MB in size.

Ólafur Waage
is it possible to link to "libgo" or similar to reduce that?
kaizer.se
You found that out two hours before I did. Perhaps the compiler is not working too well yet? Also it is statically linked I think, so perhaps this will be reduced drastically in future.
Kinopiko
It's the runtime being added to the executable. So libraries won't have this problem.
Ólafur Waage
It's because of considerations like that (OMG 500KB is sooooo huge) that you get that many libc errors in Linux where you have to install 10 different versions.
Vincent
Ah yes, the old complaint about Lisp. It turned out not to be important in larger applications, since the relatively large runtime size allowed a lot of additional programming with relatively small increase in the memory footprint. In other words, this is primarily relevant for toy programs, not programs that you'd expect to be a megabyte or larger.
David Thornley
Tsk, tsk, @David Thornley, it's _very_ important if you're going to be writing a lot of "hello world" apps.
Nosredna
@David: but for system-level programs, this is not trivial.
Paul Nathan
@David. Theere are many very serious programs that need to be small in size. Think controllers and embedded development in general.
Nemanja Trifunovic
@Nemanja Trifunovic: You're not planning to use a garbage collected, multithreaded language on an embedded microcontroller, are you?
Thomas
The go runtime is a static library. They just need make a shared lib out of it. standard system tools become very big if you link statically to libc as well.
nos
@Thomas: Why not? Smalltalk and Lisp have been used for exactly that purpose for decades.
Jörg W Mittag
+6  A: 

I'm not unhappy about go's supported platforms:

  • Linux
  • Mac OS X

(on x86, amd64 and ARM)

(Schadenfreude)

kaizer.se
Because it's an experimental language it doesn't support a lot of platforms yet.
Kinopiko
the point is which platforms it supported first and which it didn't. a natural choice, of course (for people with *nix backgrounds like the developers).
kaizer.se
Skipping Windows seriously limits the deployment base of Go programs.
Spike Williams
I rather like that it ignores crap platforms like Windows, and sticks to the good ones.
hendrixski
@hendrixski - you mean the ones used by < 10% of people...
Jason
I rather like that it ignores platforms like Windows so I won't waste my time testing it.
Stringer Bell
The fact that Windows isn't supported is a feature. That means the language is cleaner and doesn't require tons of compatibility hacks that will barely ever get used. The number of Windows developers who need something like Go is vanishingly small.
Bob Aman
@Jason, those < 10% probably include > 90% of "system" programmers.
hasen j
I'm amazed how many people honestly think that lack of Windows support *helps* language uptake. Get a reality check, people!
Dmitri Nesteruk
Smug UNIX users, sigh.
Skurmedel
Nah that BS, they should ship a win version with support for VS. Otherwise many people just will not have a look at it. Sure google internally doesn't need a win version, but it limits how popular the language can become..
Nils
+4  A: 

I would be interested to see how go's concurrency model will scale to clustered computing. The 'goroutine' system seems interesting.

Scott Wales
+15  A: 

Hey - this looks like a real smasher!

… concurrent

Go promotes writing systems and servers as sets of lightweight communicating processes, called goroutines, with strong support from the language. Run thousands of goroutines if you want—and say good-bye to stack overflows.

[Go website]

Could Go really be the end of this wonderful experience? I will miss S.O.! SO MUCH!

Peter Perháč
And coroutine.org just doesn't have the same ring to it.
ceo
I'm thinking this sounded funnier in your head :)
San Jacinto
Go still has a call stack and overflows can happen just like in C.
Andrey Vlasovskikh
+7  A: 

Google employees clearly have too much time on their hands.

.. I need to apply asap.

I like how there is already a fairly big standard lib, I havent tried it yet though.

Stefan Ernst
Application process = invent the worlds most popular language, then improve the most popular os, then get another 35years of experience - then apply
Martin Beckett
You know, not everyone at Google is a rock star legend programmer who invented a language or wrote an operating system. But they *are* picky.
Mark Renouf
+6  A: 

A language that supposedly combines the ease of development of a scripting language with the performance (almost) of C sounds like a dream come true to me. :)

Add to that the fact that it's worked on by two guys who made some very useful, long-lived products, and I suspect they may know what they're talking about.

So here's my question: do they use this language when they have the choice? The designers, as well as other Google engineers. If so, they will make it useful and usable, and it must do some good things already for them to choose it.

Derek
They used it to make the golang web server.
Nosredna
+3  A: 

There some interesting stuff such as the goroutine stuff and the "static duck typing" (which I'm actually quite curious about, I have to check that video). But, please, no generics, exceptions, method overloading or operator overloading? The common standard library packages which look like bare wrappers above the c stdlib? Bah! I'm not impressed.

Trillian
I was glad most of that stuff was gone. Interfaces look better. Of course, I'll have to write something big to be sure, but I like the idea.
Nosredna
+2  A: 

Reading "Go's type system has no hierarchy, so no time is spent defining the relationships between types" (FAQ) sounds scary to me. Whether I go to statically typed C# or dynamically typed Ruby, I can have my classes and my inheritance and my interfaces/mixins. That's how I think, and I don't know how I'd do creating a large-scale application with no inheritance.

The lack of generic types and exceptions is also odd to me, and feels like a step backward (language design FAQ).

Sarah Vessels
The lack of generic types is a problem indeed. But you can still inherit (even multiply) amongst interfaces.
Thomas
The lack of generics is explicitly mentioned in the Google TechTalk. The problem is simply that it is not at all obvious how generics should work in Go. And since generics are going to make Go's currently very straightforward type system massively more complicated, they want to make sure that that complication is worth it. IOW: they *have* to get generics "right". (*cough* Java *cough*)
Jörg W Mittag
+24  A: 

One problem I have with Go is that they speak of it as a "system" language. In my mind, a system language is something you write kernels or real-time stuff with, and mandatory non-deterministic garbage collection rules out Go for most such tasks. Then it turns out that by "system language" they really mean "server applications". Sure, Go looks fine for that purpose, but not many people consider it system programming.

Nemanja Trifunovic
+1 Good point. Server applications is not what comes to mind when speaking of a "system language".
StackedCrooked
Man, there's a lot of "systems language work" that does NOT qualify as real time. Probably 90% or more of it.
Nosredna
@Nosredna. That's why I said "or real-time".
Nemanja Trifunovic
No, I disagree, they mean writing systems as sets of lightweight communicating processes. You can write a kernel using this abstraction.
LB
I disagree, actually. Systems programming, in my mind, is "applications that don't interface with a user". I think daemons fall under the purview of "system" programming, as the alternative is "application" programming. You won't find a daemon worth its salt written in an application programming language -- I can think of a bunch written in C.
Jed Smith
I interpreted "system language" as "this is not just another web scripting language", for anyone who looked at it for a few seconds and thought "yawn... another C#".
Graeme Perrow
Isn't the web browser an integral part of the OS that definately can't be removed? I seem to remember something about that.
Martin Beckett
@mgb are you talking about windows?
hasen j
I've been trying to find a better systems programming language than C/C++ for _ages_, this may be it.
Longpoke
Go is another iteration of Alef/Limbo which are the systems languages the Plan 9 and Inferno OS respectively.
Pete Kirkham
+4  A: 

I like the minimalistic approach. It seems like they have identified a number of core crucial issues and then created a language that deals with just those while holding back syntactic sugar.

StackedCrooked
+3  A: 

I think Go will be a great language if it can survive its obscurity phase. However, I don't see it as a replacement for c++. It does several things right, concurrency is big win, and procedural syntax.

However, one of the stated goals is replace c++, and be a system programming language. I don't think it meets those goals well.

Garbage collection is generally a sign of an application language. In don't see how a language can claim it's a system language and yet require a garbage collector.

Duck typing is giving python headaches. C++ templates are having a simlar issue they are trying to solve with concepts. There needs to be a way to explicitly say what interface a type needs to fulfill. I'm not advocating Java/C# style interfaces, but they need to solve that sooner than later.

Also as a c++ programmer, I can't move to a new language that doesn't offer templates. Java/C# generics are ok but I prefer D2/C++ style full power templates.

caspin
"Garbage collection is generally a sign of an application language. In don't see how a language can claim it's a system language and yet require a garbage collector."Traditionally. And I once thought that commercial consumer apps would always be written in assembly language.
Nosredna
Telling someone who sells an operating system written in a garbage collected systems language that one cannot write an operating system in a garbage collected systems language, is kind of strange, don't you think?
Jörg W Mittag
A: 

I think this says it all:

say good-bye to stack overflow(s)

dwj
Go still has a call stack and overflows can happen just like in C.
Andrey Vlasovskikh
Meant as a self-referential (this site) joke.
dwj
+14  A: 

I have just seen the introductory video

This I what I liked ( from what I understood )

  • Braces are used ALWAYS!

    I have always had problems with that in production code. It may be considered as an small improvement, but once, I spend >3 hrs. debugging an error caused by a misplaced if. It is a nightmare.

wrong

  if x > 0  
       return 0;

or

  if x > 0 return 0;

right

  if  x > 0   { 
      return 0;
   }

or

  if x > 0   { return 0; }

always!!

Visible outside the package:

func Print(v ...) { 
}

Not visible outside the package

func print( v ... ) {
}

Yes, it may be an small improvement in the code syntax too, yet, important and a easy way to create public methods/attributes etc. and finish with a lot of discussions.

  • Interface you can plugin "anything" that accomplish the interface ( like in duck type if it says quack is a duck ) and yet have compile time checking for safety.

So the interface declare the quack method

type Quack interface {
    DoQuack()
}

And then we can may create a function using that type:

func callIt( duck Quack ) {
    duck.DoQuack()
}

To use it we only need "something" that respond to the message, for instance, a Duck and a Person they perform the function DoQuack diferently

type Duck struct {
    count int
}


func( d* Duck ) DoQuack() {
    d.count++
    for i:= 0; i < d.count ; i++ {
        fmt.Print("quack!" )
    }
    fmt.Print("\n")
}

type Person struct {}

func ( o* Person ) DoQuack() {
    fmt.Printf("Ehem, I'll try it... quack?\n")
}

Finally the check if the "struct" complies with the interface is performed by the compiler when the type is used:

func main() {
    var quack Quack
    quack = &Duck{} 
    callIt( quack )
    callIt( quack )
    callIt( quack )
    quack = &Person{}
    callIt( quack )    
}

prints:

quack!
quack!quack!
quack!quack!quack!
Ehem, I'll try it... quack?
  • Syntax

Something I didn't quite like is the syntax ... :-S I don't know how to explain it, but at this point ( 2009 ) programming languages should just flow. Go syntax, makes me stop and think twice what each line is. Probably that's just matter of getting use to it.

There are plenty of features, like the channels and the goroutines ( similar to threads ) that look pretty cool, but I think It would take me some more time to grasp them.

Finally from a sample from the install page:

http://golang.org/doc/install.html

I can see that: real programmers use cat!!!

$ cat >hello.go <<EOF
package main

import "fmt"

func main() {
    fmt.Printf("hello, world\n")
}
EOF
$ 6g hello.go
$ 6l hello.6
$ ./6.out
hello, world

Nice

OscarRyz
I really wish they had used a Python-esque syntax :(
Longpoke
<aol/> And to satisfy SO's 15char min limit: I really thought the same. Why not use Python syntax, but just not be as dynamic? I'd suspect there'd be some "market" there.
jae
sigh, I thought the same
Kugel
I disagree. Python's syntax really is not good for writing function literals IMHO
Kosta
We are not referring only to function literals, but the rest of it ( a simple `if` comes to my mind )
OscarRyz
Yay for mandatory braces. Optional braces was my very, very, very least favorite aspect of C (and most of its descendants).
Adam Crossland
+2  A: 
  • The only definitive improvement I see is the interface and type systems being untangled.
  • The concurrency model looks like it will cause profound performance issues related to data access.
  • Pretty much everything but the interface system is doable in C++ with the appropriate libraries/functions.
  • Type system is probably less expressive than C++, especially the lack of overloading.
  • They are correct in OO systems discussions having a focus on object modelling instead of solution finding.
  • Wait, another replacement for C++ with garbage collection?

The typing approach has a certain value, I suspect, and would be interesting to explore at least.

I would conclude - here and now, in my opinion - I don't see a serious future for this language outside of a webserver market having to support many many lightweight threads. I may be quite wrong, of course.

Thoughts based off of: http://golang.org/doc/effective%5Fgo.html , http://golang.org/doc/go%5Ffor%5Fcpp%5Fprogrammers.html , http://golang.org/doc/go%5Flang%5Ffaq.html .

Paul Nathan
+2  A: 

What can it really do for me (that I care about) that some other language I already know can't already do?

Until Google (or someone) comes up with a language that I can do something really cool in one line like...

Computer.MakeMeASandwich();

... I don't think I'll consider it to be anything else but yet another language.

I mean, even if it could do that, without Generics I can't imagine how it's going to be more efficient to code anything. I'll have to have a separate GetBeer method to get me a Great Lakes IPA or a PBR. Or I'll have to return generic beer and cast it as something else. And who wants to drink generic beer?

blesh
I've already designed it:public class Computer{public void MakeMeASandwich(){ // Todo: implement this}}
Neil N
just needs a little tweaking and it will be done, thats all
Neil N
perl -e "sub MakeMeASandwich { ... }"
Paul Nathan
public class Computer{ public void MakeMeASandwich() { throw new Exception("Please sudo."); } }
luiscubal
@Paul Nathan: But what if I don't want a sub? Can I do: `perl -e "hoagie MakeMeASandwich { ... }"`?
Dennis Williamson
You know there's someone at Google now working on using data gathered from Google Earth, my searches, and my Gmail account to predict what sort of sandwich I want, and they're all: "Damn! They're on to us!" "Sir! Pastrami server #561 is down!" "Well hotswap that biznatch and get me a ..." "Your coffee sir." "Thank you, computer".
blesh
+1  A: 

Yet another language with a built-in algorithm. Great for short examples and nothing but pain for tasks that don't exactly fit into provided system of threading with channels.

ima
+38  A: 

I've only watched the talk, read the FAQ and skimmed some other stuff on the website; not actually tried it. But here's my take.

Pro:

  • Strict typing; no implicit conversions. This will catch many more errors at compile time, and is a huge selling point in my book.
  • No need for explicit types on variable declarations (i.e. automatic type inference, like var in C# 3.0).
  • Interfaces with support for "multiple inheritance", reminiscent of Haskell type classes and ex-C++0x concepts.
  • Method declarations separate from the types they operate on, so extension methods (also on interfaces) are trivially possible.
  • Garbage collected.
  • Fairly clean and seemingly quite consistent syntax.
  • Closures.
  • Easy to use, lightweight concurrency constructs (channels, goroutines and the select construct).
  • Fast! Fast compiling and fast code.
  • Decent Unicode support.
  • Some slightly ugly but really practical idioms (see Effective Go), such as iota and the improved switch.
  • Comes from Google. Even if that doesn't say anything about the quality of the language itself, that fact still gives it momentum and publicity. That is something an open source project badly needs.
  • BSD licensed, no pesky GPL. Also good for momentum.

Con:

  • Lack of functional constructs like map and filter. Everything feels very imperative still. Python does a much better job here. But with the things present in the language, these constructs could be implemented as a library (i.e. not requiring syntactical support).
  • No generics (yet). The interface system partly makes up for it, but I think Go could really benefit from a generics system similar to Haskell's.
  • No overloading. We see in Haskell (liftM, liftM2, liftM3...) that this can be a pain.
  • Unlike variables, there's no type inference for methods and functions.
  • Not a very clean syntax (e.g. like Python). Feels like C with less braces.
  • No mutually recursive imports.
  • Simple-minded garbage collector. But that's being worked on.
  • Interfaces can be implemented implicitly. You just define all the methods needed. That seems convenient at first sight. But if you rename a method without knowing that it was needed to implement some interface... boom. (Same problem as with duck typing, but less so, because errors are detected at compile time.)

Bottom line: I think Go is an interesting development. There are few languages that offer such a rich feature set but still compile directly to machine code. There are no ground-breaking new developments, but Go does bring together some concepts that haven't been brought together before. I'm curious to see how the language will fare in practice.

Thomas
The need to use make() in certain places strikes me as a "con" for the language. Creations and/or initialization via the new operator in all cases is a lot clearer and more familiar pattern
Sean
I did consider including this, but figured it would not be a problem for anyone but absolute beginners. I'm mostly trying to determine how Go will fare in the hands of an experienced Go programmer.
Thomas
I think Interfaces are a **huge** Pro. There should be no 'boom' as the error is catched at compile time.
Kosta
@Kosta: It depends on your point of view. I have actually changed my mind about this point since I wrote this post, so I see what you mean :)
Thomas
+1  A: 

I would be interested to see when it will have IDE support and will be available for windows also.

Binod Singh
It already has emacs support. I'm sure eclipse and others are being written by other hobbyists as we speak.
+1  A: 

Well I think it's a neat looking language and the concurrency bits are extremely nifty. Also the removal of millions of paren's are great too(I'm programming in C#! Not Lisp! why must I have 3 different casts with 8 different sets of parens!?)

That being said. It's just another language. There are not any points yet that make it viable to compete with C/C++. The language is decently better. Decently better will not cover the expenses of retraining and all that though.

I do like that this is a lower level language(runs on the actual machine) yet has garbage collection.

I think it would be neat to test just how good it is at handling low level things by writing a kernel in it. (course parts will be bootstrapped with C, but still)

Earlz
Writing a kernel where you are using a programming languages GC and threading objects? This doesn't sound reasonable.
Lothar
It's been done.. It just takes a bit more bootstrap code to get going.
Earlz
+11  A: 
  • The lack of type hierarchy ("static duck typing") is rather brilliant, I think. Why didn't anybody think of that sooner? EDIT: Why didn't I know about this sooner? (Thanks, @Nemanja)

  • The channel concept looks really cool and will make lots of hard things easy.

  • Garbage collection, given their claim of 10%-20% penalty, is a hugely worth it. So much uninteresting C/C++ code is juggling references, and paradigms with GC can be so much cleaner.

  • Some of the syntax will take some getting used to. Confused by &'s and *'s right now.

  • Reversing the order of names and types in declarations (vs C) is the right thing to do and took some guts.

EDIT: One more point. Having now played with it for a bit, I'm disappointed you can't define methods on classes outside the local package. E.g. this doesn't work:

func (v int) square() int {
  return v * v;
}
two := 2;
four := two.square();

(Probably, some people are glad of that, and would be even if my example were more sensible.)

To add methods, you have to "alias" the type and name it explicitly:

type Number int
func (v Number) square() Number {
  return v * v;
}
var two Number = 2;
four := two.square();
Grumdrig
The proper name for "Static duck typing" is structural subtyping and it is not exactly a new thing: http://en.wikipedia.org/wiki/Structural_type_system
Nemanja Trifunovic
Why is reversing the order of names and types the right thing to do? I thought they just did it to be different, But maybe you see a real reason?
As they state in http://golang.org/doc/go_lang_faq.html#declarations_backwards "They're only backwards if you're used to C. In C, the notion is that a variable is declared like an expression denoting its type, which is a nice idea, but the type and expression grammars don't mix very well and the results can be confusing; consider function pointers." There's a couple explcit reasons given there also. It does require a "var" keyword though.
Grumdrig
The tutorials cover go quickly but also in interesting detail in examples. See Tut 2 for methods http://golang.org/doc/go_tutorial.html
kaizer.se
+2  A: 

I like the 'sort of duck typing', reminds me of an answer I gave for what I'd like in C# 4.0 (http://stackoverflow.com/questions/138367/most-wanted-feature-for-c-4-0/253441#253441)

hey ho. Oh and I was interested until, "no windows". I've seen references indicating it is possible, but I've got other things that need my time.

adam straughan
+6  A: 

Concurrency is a big plus. Syntax support for easy threading might be the next big thing.

Meanwhile, "no windows" is problematic.

The syntax will be a real barrier preventing adoption. Then again, Ruby and PHP have some weird syntax issues(PHP's $var thing, for example) and seem to be going just fine.

As soon as more libraries start showing up(GUI for the desktop, databases for the server), Go might actually have a chance.

luiscubal
+40  A: 

The gopher is probably the best programming language mascot ever.

alt text

Matthew Crumley
Yeah, I could gopher that. *hides*
Michael Myers
Dramatic Gopher?
Mark Renouf
@Renouf http://www.youtube.com/watch?v=y8Kyi0WNg40
Victor Rodrigues
+11  A: 

No one has mentioned yet: Go has already a huge amount of libraries! Including XML parser, unicode support, zip compression, json, regexp, bignum, etc. And for everything else you can link your external C code. It looks like it would be easy to start big Go projects right away.

Indeed! And I can rebuild all of them from scratch in under 10 seconds (actually clocked at 6 sec on my laptop using make -j3)
Mark Renouf
+15  A: 

Go is to C as Google Wave is to Email.

That means, "Go" and "Wave" are both Google's answer to "what would X be like if it were invented today?" (X = system progamming language or email)

When they say Go is for "system programming", I see Go as the best language thus far for software that runs in userspace but does not directly interface to users. That is daemons like httpd, udev, d-bus, upstart etc would be most conveniently written in Go. Classic unix command-line tools would also be easier to write in Go, except they've already been done in C and don't need the concurrency. Notice that Go is not for scripting nor GUIs, and in the interest of portability there is no way to add assembly code for writing a kernel, and you don't want garbage collection in a kernel language anyway.

Also, Go is designed for concurrent programming on a multiprocessor system - so its not meant for your old mobile phone but your desktops and servers. The "hello world" binaries at around 600KiB is oversized for embedded work, and garbage collection won't do in low-memory environments. But we may see it on mobile computing devices like Android phones.

Graham
The 600KiB "hello world" is due to static linking - I believe dynamically linked binaries will be much smaller and suitable for phones.
Graham
+1  A: 

Seeing := as a shortcut to declare and assign a value to variables took me back to some of the first programming experiences I had, since they were in Pascal. :o)

Jan Aagaard
+4  A: 

I, for one, welcome our Go overlords.

I've seen a lot of people taking issue with the := operand, but it should not be too strange to anyone who has written more than a basic makefile. I've been looking for something that more or less merges C and Python in an agreeable way. I found a language named Blue, which looks like its getting to that point but is developing rather slowly. Blue is also interpreted, which was a minus for me.

I think I can get up and running with Go in a month or less. I'm still seeing stars (literally, *) when studying the syntax, and my C brain instantly wants to think pointer arithmetic. So, yeah, its going to take getting used to.

My biggest complaints will probably come when I switch from C to Go to PHP within the same 48 hours while working on multiple projects. But, well, that's why we have aspirin, I suppose.

Tim Post
+2  A: 

Lack of exceptions because of multiple return values is a mistake for me.

Interface system is good.

Pointers are bad, but necessary for a system language.

Finally array checked arrays in o.s. language. FFS people.

Agnostic about how the garbage collection can scale with parallelism. Java can get 5% in code that is well written but java has decades of JIT experience.

No JIT -> probably good, but precludes some optimizations probably including the very useful escape-analysis.

Lack of parametric types is huge mistake, capable of sinking evolution of the language to the application domain.

Syntax has a good idea (names first), but lousy execution sometimes.

Inheritance... I like polymorphism, i hate inheritance. So the decision to separate the interfaces from it is HEVAN.

Overloading is a huge source of bugs both in programs and in compilers. Good riddance.

Map embedded type. Sucks if no alternative is possible to declare. And without generic types it will not. Parametric Types, for me but not for you bahhh!

paulo
A: 

What would be good is a new native code compiled language that is not C / C++ / D / Pascalish.

Especially for embedded systems.

Keith Nicholas
This answer doesn't connect to google's Go, even though it would not be difficult to make it do so.
kaizer.se
+2  A: 

Being Google I would have expected that that choose a name that's easily googleable. Really, is it that hard to find a unique name that actually lets people Google for resources about the language?

Christian
Is C a name that’s easily googleable? I’m tired of stupid but easily googleable names (Is Samsung’s new mobile platform really called 'bada'? Luckily the’ll drop it soon enough).
Nikolai Ruhe
C was developed before Google was around. Those guys had an excuse at picking a bad name.
Christian
Google "go language"
trinithis
+4  A: 

I have played around with Go for two days now. Its syntax is a bit weird and needs some time to get used to. I always want to put parentheses around my if and for statements and leaving out the semicolon feels just wrong. But after a short adaptation phase I already get some lines of code down that just work the way I've imagined it.

My main criticism so far is about the tools provided. The compiler (6g) has no options like gcc or most other compilers I know do. There's no debug or release mode, no speed/size optimization and even the strip symbols option in the linker (6l) seems to break the executable and is thus unusable. Ok, I can live with that. It's not like I aim for best performance or smallest executable. Having a fast compiler is more important.

I love D partly because it has unittesting and ddoc as integral part of the language. So I was excited at first when I heard that Go has these things as well. But so far I can't get either of them to work, and that's mainly because they are NOT part of the language.

godoc is a program, that creates a (HTML) documentation from all the packages that come with Go. But it's nearly impossible to get it to work if you have your own program, that doesn't reside inside the GOROOT subdirectories.

gotest is actually only a batch script that uses the Makefile(s) to compile the tests and run all methods that match a certain pattern. Yeah...Makefiles. I hate those. I don't use them. And it's not possible to use gotest without them. So my first little project is a build tool that makes Makefiles obsolete. From there to gotest2 shouldn't be hard.... ;)

Some more thoughts:

  • I don't know why the language has 'goto' if they don't include other things with the explanation that it would just lead to more bugs...
  • No dynamic arrays (and no simple array concatenation). They have containers in the library, but that doesn't feel the same.
  • goroutines, they work great...adding 100k elements to a vector results in a few thousand casualties (overwritten elements) but no crash. I can already see the bugs this will create, but I still think it's a great feature.
  • Channels. Seem to make writing any type of server a lot easier.
  • Source code doesn't look as clean as Java or D.
  • I'm missing some things in the documentation. The general usage of a certain package for example. The _test.go files for that package are often more helpful.
  • writing := where you should have written = can easily lead to bugs that are hard to spot (depending on font, font-size and tiredness).
  • I don't miss assertions or exceptions, yet. try-catch blocks look better than a second return value and an if block, but it's doing the same. And I can probably write an assertion function in 5 minutes that crashes my program if false.
  • I don't use generics/templates in any language if I can avoid it. I just don't like them. And I most certainly will not miss them. But others may. They seem to have a huge fan-base out there.
Maurice Gilden
+1 for being the first comment that i've seen that is from real experience.
Josiah
+3  A: 

Jeff Bone's awesome Go rant. A great read.

http://www.xent.com/pipermail/fork/Week-of-Mon-20091109/054578.html

It's merely the latest of a series of languages from these same people (former god-like heroes to me) --- most recently Limbo, each successive one of which implements the same ideas in barely, idiosyncratically, every-so-slightly different ways.

And so for 20 years now these folks --- the shining lights, in many ways, of "practical" programming language, operating systems, and general systems research --- have continued to fail to "get" the fundamental practical needs of everyday programmers working in The Real World. "Go" is just another language written first for the compiler and only secondarily for the programmer --- and stuck in a 70s mindset* about the relationship of that programmer to the (digital) world within which they live and work!

Nosredna
He didn't seem to have a single coherent thing to say about Go. Just noise.
Kinopiko
@Kinopiko - it's a rant, but there are some valid points being made once you separate them from the rant artifacts.
Kev
+7  A: 

Go should be a C replacement and as such be suitable for embedded systems development. A language that is at its core:

  • simple
  • fast
  • produces small executables (when desired)
  • sane syntax (I would consider Go's an improvement)
  • modern

Why can't Go combine the flexibility, safety, and richness of Standard ML or Haskell with the low-level expressiveness of C? For some reason it stops short.

Provide a compiler flag that strips out features for software that can't use fancy runtime stuff, like kernels for example. Go is a system language that doesn't have, even basic, ASM support? Poo. Languages like D are trying, but at the end of the day D feels like C++ redux; same ideas, same "tack-it-on" design process.

The BitC language looked promising, but I fear it may die a slow death since its main driving force and creator has left for Microsoft to pursue related endeavors.

C is an old work horse, for sure. But I think it's time to put it out to pasture (or taken to the glue factory depending on who you talk to) and replaced with something modern.

Jesse
FYI, BitC's main driving force got behind the wheel again early 2010: http://www.coyotos.org/pipermail/bitc-dev/2010-March/001809.html
mattbh
A: 

function for finding factorial

func Factorial(n int) (fact int) {
  if n == 0 {  fact = 1;  }
  else {  fact = n * Factorial(n - 1);   }
  return;
}
ragsagar
+3  A: 

No Generics. So you see things like this in http://golang.org/pkg/sort/

func SortFloats(a []float)

SortFloats sorts an array of floats in increasing order.

func SortInts(a []int)

SortInts sorts an array of ints in increasing order.

func SortStrings(a []string)

SortStrings sorts an array of strings in increasing order

Indranil Banerjee
There is a generic Sort routine... your data structure must model the Interface interface present within the sort.go source file.
fbrereto
Look at how it's implemented: `func SortInts(a []int) { Sort(IntArray(a)) }` This is not a hack, it's a convenience function.
Jurily
A: 

Without going into a rant, i think i will never use it.

acidzombie24
Tell us why. Give us information, not bare opinions.
reinierpost
There are too many reason. Not all of them are specifically about the language (reasons why i dont think it will go mainstream). I could probably come up 2dozen or more reasons and to say any would look like flamebait without a long explanation.
acidzombie24
A: 

I discovered this language today while searching Google for "safe compiled language", in the hopes of finding a crossbreed of C++ and Python. Three of the first ten results pointed to Go. I think this says something (unless the search is rigged :)

Longpoke
I guess it is rigged coz you GOOGLED it :p
Red Serpent
+1  A: 

The language is kind of what I would expect as Rob Pike's next language. Rob's done a great body of work, and this is a good logical next step. But what has me green with envy is the lightning-fast compiler. I wish I could compile C, Haskell, and ML one-tenth that fast! Luckily I write a lot of code in Lua which also compiles blindingly fast (albeit to bytecode).

Norman Ramsey
A: 

I don't understand why compiling time can be so important for Google. Someone can explain, please?

The iota keyword seems to me really weird. It's a sort of automatic-pseudo-variabile to be used in const, in order to emulate enums.

I think that enums are simpler and cleaner than the iota sintax.

I would prefer, btw, a more expressive metalanguage rather than this strange thing. Or better, a reflection structure, that let use the language itself as its own metalanguage. I understand that reflection is expensive, it requires, I think, more steps to compile, and bigger structures (meta structures are required as well). I don't think that a preprocessor could be considered as an innovative idea.

Zen
I agree with enums over iota.
trinithis
+1  A: 

yet another programming language, this time by google!! Actually there is already a language with the same name, so it is slightly confusing having more than one language with the same name.

http://www.geek.com/articles/news/google-didnt-google-go-before-naming-their-programming-language-20091113/

viky
Whoaaoaoaoaa!!!!
trinithis
+1  A: 

I think it looks like it has huge potential - there are several very interesting concepts in there, not the least of which is GC and language support for concurrency: "don't communicate by sharing data, share data by communicating".

But frankly (and I am no MS fanboy) it's irrelevant until it is available for Windows, and probably even Mac. For me it's irrelevant until it also runs on the various hand-held and phone devices out there.

Software Monkey
It is available for Mac
Dave Berk
+1  A: 

Everything postet before is very correct and comprehensive, but I haven't seen this:

  • no Conditional Compilation. The Argument is you don't need it. Your built system should do it, or in other words: use file granular conditional compilation. I am not convinced on this. ( I discovered much copy and paste code where only single casts were changed :/)

  • no assertions. The argument is that assertions are often misused for real error handling. This is certainly correct, but personally I like assertions (And evangelize their proper use).

  • no constant parameters, functions. The argument - as with assertions - is that const is often times misused or too difficult. Certainly right, but still I think it's a great thing.

I don't see that omitting these things as a solution, but postponing difficult decisions. I hope it doesn't get in the way of the language. I really really like Go.

The cool things:

  • gofmt as a prevention for style discussions. I spent much time defining my / a good style on c, so I like the idea of having a consistent style across all code. (even by force)
  • There are so many other little things that make me like this language. (It's just too many)

I have to admit that the con points mentioned above held me back to code even a single line. All I did for now is reading up and studying the mailing list discussions. Nevertheless, when a project which needs a system language comes I will give it a try.

Ronny
No consts? http://golang.org/doc/go_spec.html#ConstantsOr do you mean as function parameter?
Dave Berk
functions and parameters - thanks for the hint
Ronny
+3  A: 

I've been programming for more than a few years and I'll make a prediction based on that experience. 'Go' will be the next "C". It's not the "be all end all" language, but in the next 5 years it will take over a HUGE chunk of the programming community's attention.

Go's not perfect, but even at this stage of (im)maturity it's extremely impressive. The compilers work. They're fast. It's simple to write code to solve interesting (non-trivial) problems. The resulting code is adequately fast on one CPU. The same code can benefit from multi-CPU cores if they're available. The problem and resulting design of course need to be 'parallel' amenable, but the actual speed gains are (in my own experience) stupendous on appropriate problems. The library code is evolving (adding functions) but the basic stuff is already quite good in the areas you'd expect to need.

NOTE: AMD64 6 core CPU at 3.2 ghz for $300. as of 2010. In 2012 that might be 128 core CPU for the same price. ( for example -> http://news.bbc.co.uk/2/hi/technology/8392392.stm ) Will your current C/C++ code adapt automatically to take advantage of those new CPUs? My go code can - without any rewrite.

I've only used go for about 3 weeks but I'm ready to go out on a limb and say : Go is the Next Big Thing(tm) :-)

Hotei

Hotei