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
sarehu
Apr 20, 2007

(call/cc call/cc)
It's a bad blog post because it should have had an editing pass by rjmccall to spice it up a bit.

Adbot
ADBOT LOVES YOU

sarehu
Apr 20, 2007

(call/cc call/cc)

Markov Chain Chomp posted:

Here's a q for the Go experts -- why is Go's type system brain dead?

My real theory is that the compiler is a complete disaster (I looked) so it would be hard to do. I feel like a hypocrite because I'm 1 for 1 when it comes to having your compiler be a disaster, but I can't imagine having to add generics to their existing implementation. I just remember seeing some struct with pages of fields in it, like out of some 80's horror movie. Now they've got it implemented in Go but apparently that was with a C to Go translation so it's probably still the same.

sarehu
Apr 20, 2007

(call/cc call/cc)
Also I enjoyed reading this a day or so ago: http://dtrace.org/blogs/wesolows/2014/12/29/golang-is-trash/

sarehu
Apr 20, 2007

(call/cc call/cc)

Sorry there's no Rap Genius thread.

sarehu
Apr 20, 2007

(call/cc call/cc)

mdxi posted:

It may also be illuminating to remember that it was designed and written by people who are already titans in their field and have absolutely nothing to prove to anyone.
The problem with this explanation is that it has decent explanatory power for some of the ways that Go sucks, but not all the ways. So consider me unilluminated.

sarehu
Apr 20, 2007

(call/cc call/cc)
I could tell you how the type system would hinder me but that's why I'm not using Go for that sort of stuff. But just to pick an example, I'd badly want generic stream resequencing logic and generic stream throttling logic in a project I recently worked on. Also a bunch of stuff for performance reasons (because Go slices and maps would be wrong). C# gets this relatively "right", in particular with respect to boxing.

sarehu
Apr 20, 2007

(call/cc call/cc)
Here is what annoyed me about Go's type system yesterday. I had several types of slice, and for each of them, I wanted to find the index of the element that matched a given player. In other languages I could just write func[T] lookup(elems []T, f func(T)bool) (index int, found bool) { ... }, or actually it would be a utility written for me, but instead I had to rewrite the same for loop several times. And the same again when I wanted to make a new slice with the matched element removed. I guess it doesn't matter though because Go is made by titans in their field, just like Git, a perfect version control system that is also above criticism.

sarehu
Apr 20, 2007

(call/cc call/cc)

Bozart posted:

Just curious, why isn't a map appropriate in this case?

The order of the slice elements mattered, one represented a waiting list, the other was similar.

sarehu
Apr 20, 2007

(call/cc call/cc)
I have a question for you Go people. Suppose you write a web application in Go. What do you do to get it running in actual production?

Right now I ran it with nohup and proxied it with nginx so that it'd run on port 80 after reading a tutorial. I hope it doesn't go down!

But like, seriously, what do you do? This is not really a Go-specific question, sorry that it's in the wrong place.

sarehu
Apr 20, 2007

(call/cc call/cc)
go fmt is changing a * b to a*b on me.

I'm getting really hatey right now.

sarehu
Apr 20, 2007

(call/cc call/cc)
No it's dumb in general.

sarehu
Apr 20, 2007

(call/cc call/cc)
This is the best reason I have so far for why Go should not have generics: http://forums.somethingawful.com/showthread.php?threadid=3693703&pagenumber=2#post444927286

Adbot
ADBOT LOVES YOU

sarehu
Apr 20, 2007

(call/cc call/cc)

Deus Rex posted:

What does that have to do with generics?

You can't write your functional programming libraries without them.

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