Go, also called golang, is an open source programming language initially developed at Google. It is a statically-typed language with syntax loosely derived from that of C, adding automatic memory management, type safety, some dynamic-typing capabilities, additional built-in types such as ...

learn more… | top users | synonyms

2
votes
2answers
180 views

How would I allow a PHP front end to communicate with a back end written in Go (or any other combination of languages)?

I like PHP. It's not overly complex to achieve what you want, you can write straight up HTML inside it, and I suppose I'm just used to it. I also like Go, having just discovered it while looking for ...
2
votes
1answer
43 views

I have an unordered list of rectangles and their neighbors on four sides with no origin. How can I efficiently convert this into a grid?

I am writing a GtkGrid-like container for my GUI library for Go, and I'm trying to write the actual layout part of the code. Basically, I have an unordered list of controls. Each control is a ...
2
votes
2answers
284 views

Type inference in Golang/Haskell

I've read that Go doesn't actually have true type inference in the sense that functional languages such as ML or Haskell have, but I haven't been able to find a simple to understand comparison of the ...
8
votes
1answer
1k views

How are Rust Traits different from Go Interfaces?

I am relatively familiar with Go, having written a number of small programs in it. Rust, of course, I am less familiar with but keeping an eye on. Having recently read ...
2
votes
2answers
157 views

Does a vm implemented in garbage collected language need a garbage collector?

This is more of a theoretical question. If jvm is implemented in go which itself is a garbage collected language, then does that jvm need a separate garbage collector to be implemented for its own ...
1
vote
2answers
281 views

Go-like interfaces + multi-methods make sense?

Thinking about the design of a potential new language, I wonder how related are the concepts of built a OO similar to GO interfaces and multi-methods (I get this from ...
3
votes
2answers
530 views

Why do concurrent languages tend to have more complicated syntax?

This is a question that's been on my mind for a while. Recently I've been checking out concurrent languages like Haskell or Go or Erlang. From my point of view, they have huge benefit in performance ...
2
votes
3answers
1k views

What are the advantages of pass by value?

I always thought pass by value is a legacy from the early languages, because the designers had never seen anything else. But after seeing the brand new languages like Go adapting the same principle ...
10
votes
1answer
2k views

Are go-langs goroutine pools just green threads?

The commentator here offers the following criticism of green threads: I was initially sold on the N:M model as a means of having event driven programming without the callback hell. You can write ...
-2
votes
1answer
291 views

Could ChromiumOS be re-written in Go from the ground up? [closed]

As Go seems able to performance match C and with Google obviously biased towards Go, I feel that it would be great way for Go to gain more traction. The way ChromiumOS/Chrome has jumped from an ...
3
votes
1answer
346 views

What do goroutines, Ruby Fibers, etc. look like to the OS/Kernel?

In process concurrency and thread concurrency it's quite obvious how the kernel sees these as they map directly to real things that the kernel manages. When it comes to Golang goroutines and Ruby ...
13
votes
2answers
1k views

Why is there a “new” in Go?

I'm still puzzled as why we have new in Go. When you want to instantiate a struct, you do t := Thing{} and, obviously, you can get a pointer to a new instance by doing t := &Thing{} But ...
8
votes
1answer
2k views

Erlang and Go concurrent programming, objective differences between CSP and Actors?

I was looking into concurrent programming in Erlang and Go programming languages. As per my finding they are used Actor model and CSP respectively. But still I am confused with what are the objective ...
1
vote
1answer
191 views

“A line comment acts like a newline”

I'm reading the Go language specification. The section on comments states: Line comments start with the character sequence // and stop at the end of the line. A line comment acts like a newline. ...
2
votes
2answers
576 views

What are the prerequisites for learning Go

I am considering learning Go. As far as I know about it, it's a systems language geared toward parallel programming. (correct me if I'm wrong) Should I have a very good understanding of C in order ...
11
votes
1answer
1k views

How does Go improve productivity with “implicit” interfaces, and how does that compare with C#'s notion of Extension Methods?

In the Go Language Tutorial, they explain how interfaces work: Go does not have classes. However, you can define methods on struct types. The method receiver appears in its own argument list ...
5
votes
3answers
451 views

Performance considerations when using Go for my project

I'm looking at using Go (aka golang) for a project (a SQL database, but that mostly doesn't matter here) where performance is critical, but under low load the primary bottleneck will be I/O to disk. ...
2
votes
2answers
2k views

clojure/erlang/go for high volume server

I have a project that will need to handle 1000s of requests a second with a decent amount of processing for each. For the most part, the processing will be done on a list of items, basically ...
8
votes
2answers
389 views

Why does Go have a special case for abs(0)

I was playing around with Go, and found this particular interesting code for the abs function in the math package: http://golang.org/src/pkg/math/abs.go 14 func abs(x float64) float64 { 15 ...
1
vote
3answers
348 views

What can Go chan do that a list cannot?

I want to know in which situation Go chan makes code much simpler than using list or queue or array that is usually available in all languages. As it was stated by Rob Pike in one of his speeches ...
26
votes
8answers
3k views

When would you need “hundreds of thousands” of threads?

Erlang, Go, and Rust all claim in one way or another that they support concurrent programming with cheap "threads"/coroutines. The Go FAQ states: It is practical to create hundreds of thousands ...
8
votes
1answer
400 views

Math library methods in Google's Go Programming Language

I have been programming in google Golang and have been enjoying it due to its brevity but I find it surprising that almost all its Math standard library methods are for the floating point type. Is ...
14
votes
1answer
10k views

Sets Data Structure in Golang

I really like google golang but could some one explain what the rationale is for the implementors having left out a basic data structure such as sets from the standard library?
2
votes
1answer
2k views

Container types in Golang

For a non-OOP language like google Go, is it idiomatic to go about implementing new container types using datatypes like arrays or lists so as to implement convenient functionality like contains ...
4
votes
2answers
369 views

Seeking documents on the philosophy of Google's Go? [duplicate]

Having asked a similar question here: What are Ruby's strengths? I continue my quest to understand the strengths and philosophy of languages by asking for a document on the awesomeness of Google's ...
6
votes
1answer
262 views

Optimizing hash lookup & memory performance in Go

As an exercise, I'm implementing HashLife in Go. In brief, HashLife works by memoizing nodes in a quadtree so that once a given node's value in the future has been calculated, it can just be looked ...
3
votes
2answers
855 views

What degree of low-level programming can be achieved with Languages like Go?

Go and D provide garbage collection, and yet they claim to be system programming languages. What degree of low-level programming can be achieved with languages having garbage collection? For ...
14
votes
6answers
736 views

How to search for information related to Go programming language?

If there's something that would kill Go language, then it's name. I find it very hard to find anything in web related just by using "Go" in the query. The word is on of the most frequent in English. ...
11
votes
2answers
2k views

When Rob Pike says “Go is about composition”, what exactly does he mean? [closed]

From Less is Exponentially More If C++ and Java are about type hierarchies and the taxonomy of types, Go is about composition.
2
votes
2answers
1k views

Equivalent of Domain Driven Design for functional programming languages

I really love the idea of domain driven design, however, as I'm learning Go, I'm wondering if there's the equivalent of DDD that's aimed at an effectively more functional language?
10
votes
1answer
4k views

Why did Golang discontinue the “netchan” package?

The Golang "netchan" package seems to have been discontinued. That makes me think that the concept of "networked channels" were not a good practice after all. (Why wouldn't them just "let it be" ...
10
votes
5answers
2k views

Benefits of classic OOP over Go-like language

I've been thinking a lot about language design and what elements would be necessary for an "ideal" programming language, and studying Google's Go has led me to question a lot of otherwise common ...
0
votes
1answer
120 views

Go/Obj-C style interfaces with ability to extend compiled objects after initial release

I have a conceptual model for an object system which involves combining Go/Obj-C interfaces/protocols with being able to add virtual methods from any unit, not just the one which defines a class. The ...
6
votes
2answers
229 views

Language that can statically ensure a map's fields are present

If data is simple and objects are complex, I'm curious if there are any existing statically typed languages that would be able to augment(?) a map type into a type with guaranteed fields. I realize ...
1
vote
2answers
1k views

Equivalent of #map in ruby in golang

I'm playing with Go and run into something I'm unable to find in Google, although there is certainly something that exists: I'm using the following struct: type Syntax struct { name string ...
8
votes
2answers
709 views

What is the name for the programming paradigm characterized by Go?

I'm intrigued by the way Go abandons class hierarchies and seems to completely abandon the notion of class in the typical object oriented sense. Also, I'm amazed at the way interfaces can be defined ...
7
votes
4answers
3k views

GO instead of C/C++ with cgo

Is it possible to replace C and C++ with Go + cgo and interface frameworks such as Qt or DirectX with Go? Any potential pitfalls I should be aware of? UPDATE: I see that my question was not precise ...
0
votes
0answers
181 views

Learning the GO programming language and its prospects [duplicate]

Possible Duplicate: What are the chances of Google's Go becoming a mainstream language? Recently I've started experimenting with The GO programming language by Google. Its a ...
17
votes
5answers
1k views

Advantages of a left to right language syntax

I've been watching an interview with Herb Sutter on Channel9 and he mentioned at the end of the video that left to right language syntax would be on the top on his whishlist for a future C++ ...
10
votes
4answers
8k views

The Future of Golang. Multiple Language Support? [closed]

Golang seems promising. I've been following this lang since its first release. It might take time to be a very good competitor to other programming languages. One brilliant aspect of Java and .NET I ...
25
votes
3answers
8k views

How fast can Go go?

Go is one of the few languages that are supposed to run 'close to the metal', i. e. it's compiled, statically typed and executes code natively, without a VM. This should give it a speed advantage over ...
3
votes
3answers
1k views

Is Google's Go a type-safe language?

this page http://golang.org/doc/go_faq.html writes: although Go has static types the language attempts to make types feel lighter weight than in typical OO languages So my question is ...
2
votes
4answers
872 views

Could Go work with other user interfaces than Web?

Go seems to be made for doing server side stuff for the web. What could I do if my boss suddenly dictated that he wants a Windows GUI for a Go application?
32
votes
4answers
4k views

How much is Google investing in the Go language?

I have read quite a bit about the Go language, and it seems promising. The last important bit of information I am missing before I decide on spending more effort on the language is: How much money/man ...
53
votes
12answers
5k views

What are the chances of Google's Go becoming a mainstream language? [closed]

Who here is learning Go? Are other companies looking at using it? Is it likely to become widely used?
5
votes
2answers
618 views

Looking for parallel programming problem

I am trying to come up with a problem that is easily solvable in a parallel manner and that requires communication between threads for a test. I also am trying to avoid problems that require require ...