Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Ganson
Jul 13, 2007
I know where the electrical tape is!
I'd also really like to see a field report for the delve debugger on VS code, liteide, and atom. I've been meaning to look at it but I don't want to go through a bunch of install docs for something that may or may not be worth the trouble.

Adbot
ADBOT LOVES YOU

rvm
May 6, 2013
Just use IDEA Community plugin if you want full IDE experience with Go. It's not official (yet), but it's developed by JetBrains guys as a 20% project (just like Go itself used to be at Google). At this point nothing comes close.

When it comes to debugging, though, it's probably IDEA > VS Code / Sublime >>> Atom. So, if you're used to, say, Sublime, there's no reason to switch to IDEA just for that, and Atom's plugin is improving as well.

Winkle-Daddy
Mar 10, 2007
As someone coming from vim (albeit with a bunch of plug-ins) I must say that Atom is great. I've always thought that IDEA "feels" really sluggish (whatever that means, I feel the same about pyCharm, intellij, aptana, eclipse, etc), while Atom feels very snappy and unobtrusive. The only issue I've run into so far is that one of the plug-ins appears to eat my imports if I'm importing two different directories in the same Github repo. That's the sole issue I've run into so far, though.

I also find that since my Go projects are not monolithic but tend to be more service oriented, a full IDE experience is probably not as helpful as it would be if I was working on a complex Python project or something.

Hadlock
Nov 9, 2004

rvm posted:

When it comes to debugging, though, it's probably IDEA > VS Code / Sublime >>> Atom.

I just wanted to say, I spent about 80% of my time today at work writing Go on Microsoft VS Code on a Mac. I am pretty sure 12 year old me in the early 90s would have never guessed that in a million years.

bonds0097
Oct 23, 2010

I would cry but I don't think I can spare the moisture.
Pillbug

Hadlock posted:

I just wanted to say, I spent about 80% of my time today at work writing Go on Microsoft VS Code on a Mac. I am pretty sure 12 year old me in the early 90s would have never guessed that in a million years.

Same, for so many reasons.

OWLS!
Sep 17, 2009

by LITERALLY AN ADMIN
Go is neat. I'm by no means a serious programmer (more on the ops side of things, professionally), but drat does it make it easy to write relatively dumb things like overly complex (and automatically updating with our infrastructure) nagios checks.

(To contribute to the editor discussion: emacs with Gomode, or TextWrangler if I'm on a mac.)

bonds0097
Oct 23, 2010

I would cry but I don't think I can spare the moisture.
Pillbug
I love how naturally Go handles both low-level and high-level stuff. I can be implementing an SSLv2 handshake one day and dealing in raw bytes easily (something I always hated doing in Python) and then just as easily (and readably) be working at a much higher level of abstraction and it all feels the same.

Progressive JPEG
Feb 19, 2003

Just noticed that shared libs are now a hot new experimental feature, after years of praising static-only.

Reminds me of the original tech talks stressing how blazing fast the compiler was because hardly any optimizations had been implemented.

Mr. Crow
May 22, 2008

Snap City mayor for life
How are the analytics libraries for go these days? Anything similar to pandas in Python?

Bozart
Oct 28, 2006

Give me the finger.

Mr. Crow posted:

How are the analytics libraries for go these days? Anything similar to pandas in Python?

Nothing like pandas really. The type system really fights against data frames. I implemented something like it using the reflect package but it was quite a mess and I would never use it for actual work.

Mao Zedong Thot
Oct 16, 2008


Mr. Crow posted:

How are the analytics libraries for go these days? Anything similar to pandas in Python?

Yeah, pretty good example of thing that is probably awful in golang. Stick to pandas :/

Bozart
Oct 28, 2006

Give me the finger.

so loving future posted:

Yeah, pretty good example of thing that is probably awful in golang. Stick to pandas :/

To be fair pandas is pretty bad, but in golang it is only barely possible to do so it is even worse.

Winkle-Daddy
Mar 10, 2007
Uhhhhh, stupid question about how channels work and my Google-fu is failing me this afternoon.

Let's say I'm creating a hypothetical data struct that's a bunch of hostnames/platforms. Now let's say I want to ping each of these once and just return a confirmation that a certain host was completed back to the main function.

My first inclination is to do something like this:
code:
package main

import (
	"fmt"
)

type hostInfo struct {
	hostname string
	platform string
}

func pinger(data hostInfo, done chan hostInfo) {
	// Code to do some ping stuff...
	done <- data
}

func main() {
	pchan := make(chan hostInfo)
	someData := []hostInfo{}
	someData = append(someData, thingie{"10.1.1.1", "linux"})
	someData = append(someData, thingie{"10.1.1.2", "linux"})
	someData = append(someData, thingie{"10.1.1.3", "linux"})
	someData = append(someData, thingie{"10.1.1.4", "linux"})
	for _, v := range someData {
		go pinger(v, pchan)
	}
	close(pchan)
	for data := range pchan {
		fmt.Printlf("Finished with %s of type %s.", data.hostname, data.platform)
	}
}
This code just exits immediately and I assume it's because I have nothing receiving on "pchan", but I thought the range built in would receive on a channel until it's closed, but it doesn't appear to be working quite like I'd expect.

This is just a stupid simple example to help me understand how these things work. In a real example I am quite certain my design would be significantly different.

e: okay, the problem is slightly different than I thought. If I close the channel, then I can't receive on it anymore. If I remove the close, my output looks like:
code:
./go-concurrency
Finished with 10.1.1.1 of type linux.
Finished with 10.1.1.2 of type linux.
Finished with 10.1.1.3 of type linux.
Finished with 10.1.1.4 of type linux.
fatal error: all goroutines are asleep - deadlock!
So I must just be messing a way to essentially do a deferred close (but not really because if I defer it, it's a deadlock as it's in main).

Winkle-Daddy fucked around with this message at 22:35 on Jun 27, 2016

Mao Zedong Thot
Oct 16, 2008


Winkle-Daddy posted:

Uhhhhh, stupid question about how channels work and my Google-fu is failing me this afternoon.

Let's say I'm creating a hypothetical data struct that's a bunch of hostnames/platforms. Now let's say I want to ping each of these once and just return a confirmation that a certain host was completed back to the main function.

My first inclination is to do something like this:
code:
package main

import (
	"fmt"
)

type hostInfo struct {
	hostname string
	platform string
}

func pinger(data hostInfo, done chan hostInfo) {
	// Code to do some ping stuff...
	done <- data
}

func main() {
	pchan := make(chan hostInfo)
	someData := []hostInfo{}
	someData = append(someData, thingie{"10.1.1.1", "linux"})
	someData = append(someData, thingie{"10.1.1.2", "linux"})
	someData = append(someData, thingie{"10.1.1.3", "linux"})
	someData = append(someData, thingie{"10.1.1.4", "linux"})
	for _, v := range someData {
		go pinger(v, pchan)
	}
	close(pchan)
	for data := range pchan {
		fmt.Printlf("Finished with %s of type %s.", data.hostname, data.platform)
	}
}
This code just exits immediately and I assume it's because I have nothing receiving on "pchan", but I thought the range built in would receive on a channel until it's closed, but it doesn't appear to be working quite like I'd expect.

This is just a stupid simple example to help me understand how these things work. In a real example I am quite certain my design would be significantly different.

You're closing your channel before you read it.

You probably want to do something like this:

code:
func main() {
.......
	for _, v := range someData {
		go pinger(v, pchan)
	}
	defer close(pchan)

	for i := 0; i < len(someData); i++ {
		select {
		case data := <-pchan:
			fmt.Printf("Finished with %s of type %s.\n", data.hostname, data.platform)
		}
	}
}

waffle enthusiast
Nov 16, 2007



If you're unsure about the number of things you're going to pass on the channel, you can also use a WaitGroup. Notice that the WaitGroup needs to live in its own goroutine in order to be able to close the channel:

code:
package main

import (
	"fmt"
	"sync"
)

type hostInfo struct {
	hostname string
	platform string
}

func pinger(data hostInfo, done chan hostInfo, wg *sync.WaitGroup) {
	defer wg.Done()
	// Code to do some ping stuff...
	done <- data
}

func main() {
	pchan := make(chan hostInfo)
	var wg sync.WaitGroup

	someData := []hostInfo{}
	someData = append(someData, hostInfo{"10.1.1.1", "linux"})
	someData = append(someData, hostInfo{"10.1.1.2", "linux"})
	someData = append(someData, hostInfo{"10.1.1.3", "linux"})
	someData = append(someData, hostInfo{"10.1.1.4", "linux"})

	for _, v := range someData {
		wg.Add(1)
		go pinger(v, pchan, &wg)
	}

	go func() {
		wg.Wait()
		close(pchan)
	}()

	for data := range pchan {
		fmt.Printf("Finished with %s of type %s.\n", data.hostname, data.platform)
	}

}

Winkle-Daddy
Mar 10, 2007

so loving future posted:

You're closing your channel before you read it.

You probably want to do something like this:

code:
func main() {
.......
	for _, v := range someData {
		go pinger(v, pchan)
	}
	defer close(pchan)

	for i := 0; i < len(someData); i++ {
		select {
		case data := <-pchan:
			fmt.Printf("Finished with %s of type %s.\n", data.hostname, data.platform)
		}
	}
}

That was odd, I did:
code:
for _ := range pchan
instead of
code:
for _ := range someData
Which then works as expected. As does your for loop. I was trying to iterate over the channel instead of the values in my slice. Whoops.


Dangerllama posted:

If you're unsure about the number of things you're going to pass on the channel, you can also use a WaitGroup. Notice that the WaitGroup needs to live in its own goroutine in order to be able to close the channel:

code:
package main

import (
	"fmt"
	"sync"
)

type hostInfo struct {
	hostname string
	platform string
}

func pinger(data hostInfo, done chan hostInfo, wg *sync.WaitGroup) {
	defer wg.Done()
	// Code to do some ping stuff...
	done <- data
}

func main() {
	pchan := make(chan hostInfo)
	var wg sync.WaitGroup

	someData := []hostInfo{}
	someData = append(someData, hostInfo{"10.1.1.1", "linux"})
	someData = append(someData, hostInfo{"10.1.1.2", "linux"})
	someData = append(someData, hostInfo{"10.1.1.3", "linux"})
	someData = append(someData, hostInfo{"10.1.1.4", "linux"})

	for _, v := range someData {
		wg.Add(1)
		go pinger(v, pchan, &wg)
	}

	go func() {
		wg.Wait()
		close(pchan)
	}()

	for data := range pchan {
		fmt.Printf("Finished with %s of type %s.\n", data.hostname, data.platform)
	}

}

Thanks! I'll see if this is easier to work with next. I have a project where I'll need to spin off a large work load into various go routines and then organize them, so I'm just creating super small examples to help get my brain around how this all works.

skul-gun
Dec 24, 2001
I got this account for Xmas.

Winkle-Daddy posted:

Thanks! I'll see if this is easier to work with next. I have a project where I'll need to spin off a large work load into various go routines and then organize them, so I'm just creating super small examples to help get my brain around how this all works.

You might find these presentations/articles helpful, if you haven't seen them already:
Go Concurrency Patterns
Advanced Go Concurrency Patterns
Go Concurrency Patterns: Pipelines and cancellation
Go Concurrency Patterns: Context

Lonely Wolf
Jan 20, 2003

Will hawk false idols for heaps and heaps of dough.
Missed the party, but you can just write

code:
for range someData {
   //loops len(someData) times
}
if you don't care about the index or value, as of go 1.4

Winkle-Daddy
Mar 10, 2007

Thanks! These are really helpful and I should stop trying to learn from the language spec and standard library docs alone. :downs:

Lonely Wolf posted:

Missed the party, but you can just write

code:
for range someData {
   //loops len(someData) times
}
if you don't care about the index or value, as of go 1.4

Thanks for the tip! I thought it was silly you needed to use as bit bucket there if you didn't care about the iterator at all, now I know.

First Time Caller
Nov 1, 2004

Learning Go because we're using Youtube's open source mysql sharding toolset, Vitess. http://www.vitess.io

Really cool poo poo. Why is thread so inactive, go is awesome.

Urit
Oct 22, 2010

First Time Caller posted:

Learning Go because we're using Youtube's open source mysql sharding toolset, Vitess. http://www.vitess.io

Really cool poo poo. Why is thread so inactive, go is awesome.

There's not much to post about because all the legitimately cool poo poo is done by Rust and everyone's already argued out Generics etc. The language is so simple that there's not much to talk about especially once you realise it's Google re-inventing Java like Microsoft did with C#.

Mao Zedong Thot
Oct 16, 2008


Go rules so hard there's not much to say about it. Way more like a reimagined C than Java though. That it's GC'd is a red herring, outside of specific niches GC shouldn't be a thing devs should worry about.

So vendoring is first class now, which rules hard. I got 99 problems but dependencies are never one. What do y'all think of glide vs godep vs? I've mostly used godep, but think it will probably be glide soon.

bonds0097
Oct 23, 2010

I would cry but I don't think I can spare the moisture.
Pillbug

VOTE YES ON 69 posted:

Go rules so hard there's not much to say about it. Way more like a reimagined C than Java though. That it's GC'd is a red herring, outside of specific niches GC shouldn't be a thing devs should worry about.

So vendoring is first class now, which rules hard. I got 99 problems but dependencies are never one. What do y'all think of glide vs godep vs? I've mostly used godep, but think it will probably be glide soon.

We used godep before 1.5 but have been using glide since and I prefer it. Not having to vendor dependencies and just relying on reproducible deploys via 'glide install' is nice. The tool lacks maturity in some areas but it's constantly being improved so I'm hopeful.

Volte
Oct 4, 2004

woosh woosh
Go briefly became my go-to server language before I got a job writing Elixir, and now I don't really see the point of Go on the server anymore. I doubt sheer computational performance is ever going to matter as much as scalability and concurrency, unless you're working on a small project where even Django or Rails would be fine, so Elixir/OTP wins in every single category I can think of. It's kind of ugly but so is Go, so v:shobon:v

waffle enthusiast
Nov 16, 2007



I think glide is the up and comer. At Gophercon more people raised their hands when Kelsey asked about glide vs godep, but I think that's inertia as opposed to momentum. We use glide at work.

First Time Caller posted:

Really cool poo poo. Why is thread so inactive, go is awesome.

It's still a pretty niche language by overall usage, even though it seems like literally everything new and awesome is being written in it: Docker, Kubernetes, Prometheus, pretty much everything in the Hashicorp stack now.

Pollyanna
Mar 5, 2005

Milk's on them.


I kinda like Go as a language too, but I think the problem is that its applications are primarily lower-level and specialized - as people have said, it seems to do a specific few things:

  • shell script replacement
  • related to the above, devops scripting
  • systems programming for stuff people used to do in C or C++, basically drivers 'n poo poo
  • basic, unframeworked web and networking stuff like microservices
  • CONCURRENCYYYYY as an alternative to OTP

It's not a surprise that Docker, Kubernetes, and Hashicorp stuff are written in Go - they're very low-level, systems-oriented solutions for things the grand majority of programmers and engineers take for granted and never have to think about. Way I see it, if what you're doing is relatively independent of platform, complicated enough to be handled by a framework like Rails or Phoenix, noticeably benefits from functional programming, has anything to do with game dev, or is particularly high-level in concept, it's not really a Go thing.

Basically, Go is an ops language.

Dangerllama posted:

It's still a pretty niche language by overall usage, even though it seems like literally everything new and awesome is being written in it: Docker, Kubernetes, Prometheus, pretty much everything in the Hashicorp stack now.

I'd argue that the reason Go is niche yet a bunch of cool stuff is made in it is because 1. these are solutions to real and difficult problems, 2. Go is specifically designed around enabling these solutions, and 3. these solutions are widely used and very much the backbone of the systems we use. These solutions are niche because not many people work in it yet heavily rely on what's written with it, and not many people work in it because the problems it is specialized in solving are really advanced and really hard. There's a reason it's Google's baby.

Pollyanna fucked around with this message at 16:16 on Oct 18, 2016

Coffee Mugshot
Jun 26, 2010

by Lowtax
I don't know why people constantly claim Go is Google's baby. We have more external users than internal users by far and it's been an uphill battle to get people to use Go within Google. Python programmers maybe, but c++ and java programmers aren't that interested.

Ferg
May 6, 2007

Lipstick Apathy

Coffee Mugshot posted:

I don't know why people constantly claim Go is Google's baby. We have more external users than internal users by far and it's been an uphill battle to get people to use Go within Google. Python programmers maybe, but c++ and java programmers aren't that interested.

It also gets basically zero attention at IO anymore. It's really just a project sponsored by Google more than anything.

Hadlock
Nov 9, 2004

Is there a fast and easy way to install go 1.6+ (preferably 1.7.2+) on a RPi 3

Hypriot has some crazy 27 step guide on compiling Go for ARM64 but it's got to be easier than that... right? I was unable to find any precompiled binaries ready to go.

Hadlock
Nov 9, 2004

Hadlock posted:

Is there a fast and easy way to install go 1.6+ (preferably 1.7.2+) on a RPi 3

Hypriot has some crazy 27 step guide on compiling Go for ARM64 but it's got to be easier than that... right? I was unable to find any precompiled binaries ready to go.

Answer

code:
wget [url]https://storage.googleapis.com/golang/go1.7.3.linux-armv6l.tar.gz[/url]
tar -C /usr/local -xzf go1.7.3.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin
And/or https://golang.org/dl/

Winkle-Daddy
Mar 10, 2007
Help!

I'm fixing up some co-workers code. He needed to add some cross platform support to windows. It's laid out like this now:

code:
main.go
networking.go
utils.go
utils_windows.go
Most of utils_windows.go is the same as utils.go with a few minor edits. This seems silly to me, in my head I should be able to do something like:
code:
utils_common.go
utils_windows.go
utils_linux.go
In this way I would like everything OS specific in the file indicated for that OS. The problem is that if I have:

code:
utils_windows.go

func foo() bar {
  //do stuff
}

-------------------------
utils_linux.go

func foo() bar {
  // do stuff
}

-------------------------
utils_common.go

func foobar() blah {
  blah := foo()
}
In this sort of a scenario, utils_common can't find the OS specific function. What's the best way to unfuck this code in such a way that my linters won't freak out about the fact that every OS specific function he added is defined twice?

e: this is highly simplified, the fuckening is great with this one :\ It's actually dozens and dozens of dupe functions

Mao Zedong Thot
Oct 16, 2008


https://dave.cheney.net/2013/10/12/how-to-use-conditional-compilation-with-the-go-build-tool

You can use `// +build linux` to control which files are built, or just use `_<os>.go` filename suffix. The below works fine with `go build` for example.

main.go
code:
package main

import ()

func main() {
	foo()
}
main_linux.go
code:
package main

import (
	"fmt"
)

func foo() {
	fmt.Println("linux")
}
main_windows.go
code:
package main

import (
	"fmt"
)

func foo() {
	fmt.Println("windows")
}
edit: really you just need `foo_common.go` to be `foo.go` I think

Mao Zedong Thot fucked around with this message at 19:26 on Nov 16, 2016

Winkle-Daddy
Mar 10, 2007
e: ^^^ yeah, I removed _common.go to get my makefile to build, which now looks something like this:

code:
LINUXBINARY=foo
OSXBINARY=foo-osx
WINDOWSBINARY=foo.exe

VERSION=1.2.0
BUILDTIME=`date +%FT%T%z`

WIN_FILES = networking_windows.go utils_windows.go
LINUX_FILES = utils_linux.go
COMMON_FILES = client.go types.go main.go utils.go networking.go

# Things are passed in with LDFLAGS
LDFLAGS=-ldflags "-X main.version=${VERSION} -X main.buildTime=${BUILDTIME}"

all: linux windows osx

linux: main.go
	env GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -o ${LINUXBINARY} -v $(LINUX_FILES) $(COMMON_FILES)

windows: main.go
	env GOOS=windows GOARCH=amd64 go build ${LDFLAGS} -o ${WINDOWSBINARY} -v $(WIN_FILES) $(COMMON_FILES)


osx: main.go
	env GOOS=darwin GOARCH=amd64 go build ${LDFLAGS} -o ${OSXBINARY} -v $(LINUX_FILES) $(COMMON_FILES)

.PHONY: clean
clean:
	if [ -f ${WINDOWSBINARY} ] ; then rm ${WINDOWSBINARY} ; fi
	if [ -f ${LINUXBINARY} ] ; then rm ${LINUXBINARY} ; fi
	if [ -f ${OSXBINARY} ] ; then rm ${OSXBINARY} ; fi
So it builds...and I'm probably going overkill using both OS suffixes and defining different build files as my common files...

Hmm, I think this may just be a linter thing, where it complains that functions in an OS specific file are undefined...because it does seem to build okay so long as no functions are re-declared between the common file and the OS specific file.

Winkle-Daddy fucked around with this message at 19:37 on Nov 16, 2016

Winkle-Daddy
Mar 10, 2007
So...doing things this way seems to have broken my ability to run automated tests. If I build, and provide as args every file I want to include it works fine. If I try to use build tags to control how things build I get the following error:
code:
go build .
./networking.go:132: undefined: createFSFromTemplate
./networking.go:136: undefined: modFSFromTemplate
./networking.go:140: undefined: cleanMockFS
./utils.go:28: undefined: convertTextToJSON
The functions that are being complained about exist only in the _[os] version of the file. Is there some other magic I can do to make this work or are all my options at this point potential time sinks?

Mao Zedong Thot
Oct 16, 2008


Winkle-Daddy posted:

So...doing things this way seems to have broken my ability to run automated tests. If I build, and provide as args every file I want to include it works fine. If I try to use build tags to control how things build I get the following error:
code:
go build .
./networking.go:132: undefined: createFSFromTemplate
./networking.go:136: undefined: modFSFromTemplate
./networking.go:140: undefined: cleanMockFS
./utils.go:28: undefined: convertTextToJSON
The functions that are being complained about exist only in the _[os] version of the file. Is there some other magic I can do to make this work or are all my options at this point potential time sinks?

My example builds fine with `go build .` -- it picks up `main_<os>.go` functions. You have networking.go/networking_<os>.go? Try removing the build tags maybe?

Or if you can provide a reproducible example via gist or something I can poke at it.

Chasiubao
Apr 2, 2010


Got a new job where I have to use Go, and it's kind of hard to get used to coming from a full .NET stack background :smith:

comedyblissoption
Mar 15, 2006

Chasiubao posted:

Got a new job where I have to use Go, and it's kind of hard to get used to coming from a full .NET stack background :smith:
Can you elaborate on this? I mainly have experience w/ .NET and am wondering if my preconceived notions of golang would match yours.

Urit
Oct 22, 2010

comedyblissoption posted:

Can you elaborate on this? I mainly have experience w/ .NET and am wondering if my preconceived notions of golang would match yours.

Not the person who posted before, but for me coming from .NET I missed generics and class-based inheritance the most plus some stuff feels strangely clunky and you can't do operator overloading. Oh, and there's no such thing as function overloading (e.g. foo(string x) and also foo(string x, int y))

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
Go really needs function overloading, imo. It makes the clutter from not having generics that much worse, because now add(foo_type) has to be written to add_foo_type(foo_type) which is annoying.

After spending time with the language, I stopped caring about that because I started accepting go's thesis re: simplicity and lack of indirection.

My main complain about go these days is that the community is full of luddites who are hostile towards both useful language features and anyone introducing a new library that attempts to do...anything. My main experiences are on the golang reddit, though, which is no longer an official community. So maybe it's not representative of the real go community.

Adbot
ADBOT LOVES YOU

Chasiubao
Apr 2, 2010


comedyblissoption posted:

Can you elaborate on this? I mainly have experience w/ .NET and am wondering if my preconceived notions of golang would match yours.

Background: I've been a C# backend developer for the better part of 5, almost 6 years.

  • The toolchain sucks. C#/.NET is pretty much 'install Visual Studio and Resharper.' Go for me, on Windows, was 'pick a text editor, install Git, run some package install commands, download the Go SDK, set some environment variables, by the way hope you don't need a functioning debugger'.
  • Speaking of a debugger, the lack of a good one (I'm using Delve which is passable at best) blows my mind. How anyone considered Go a production ready language without a working debugger that can be used to fully inspect and diagnose things is beyond me.
  • No exceptions. I understand why they chose to do it this way, but what it ends up with is code littered with if err != nil checks everywhere. I'm not sure it's better.
  • Other people have already talked about the lovely type system.
  • I've never been a fan of the OSS model of 'download a trillion loving packages to do anything'. I much prefer .NET's much more expansive BCL.
  • Too much stuff is inferred. I prefer explicit visibility modifiers, for example.

There's more but this is off the top of my head. My main complaint is really the frustration at the lovely tools and the overall attitude of 'gently caress you if you want to debug poo poo, that's not our problem'.

Fake edit: I absolutely recognize that a lot of my complaints can be dismissed as 'that's not how Go is done' and 'you're an enterprise developer' which, well, yes and yes. I think my issues are still valid. It's just harder for me to do things. When things are working, Go is a nifty toy language. But trying to do anything complex feels like pulling teeth when you're not quite sure why something went wrong.

Chasiubao fucked around with this message at 20:43 on Dec 12, 2016

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply