Live data from Hacker News

Go by Example

gobyexample.com

21–30 of 130 posts

Re: Go by Example

#21

It's Friday gents! No excuse to set aside Saturday and Sunday, you can easily go through these examples in two days and grok it. Go is that _slim_, and that's good! Guaranteed you'll find use for Go in one system or the other when you want easy deployment, fast development time and extreme speeds. :) (Disclaimer: I love Go and I hope it goes mainstream in a big way in 5 years)

One nice thing these examples also do is make it really simple for detractors to point out what they don't like about it. My #1 gripe about go, for example, is this: https://gobyexample.com/sorting-by-functions

In a few other languages:

    // C++
    sort(vs.begin(), vs.end(), 
         [](const string& l, const string& r) -> bool { 
             return l.size() 
When they fix this, Go might be the perfect language for me. Until then, I'm not touching it with a pole.

Re: Go by Example

#22
post #14

Earlier quoted context omitted.

Are there any plans to add generics yet, or do I still have to write a bunch of extra boilerplate functions in order to sort a list?

What does yet another gripe about generics in Go have to do with a tutorial written by an independent party, one that is about features in the language today ?

Same reason most posts about MongoDB for a long time had complaints about Mongo's uh . . . let's say "relaxed" . . . approach to durability. Because proponents of the language/system/idea tend to promote an unbalanced view of its quality, its detractors need to be there to give people on the fence the right dose of the bad medicine.

Also, speaking only for myself, I really like the language and its ideas, but that one thing it's missing makes it too annoying to write code in it. I'd like to see more people aware of this deficiency and putting pressure on the language's owners to fix that problem, so that I can start using it.

Re: Go by Example

#25
post #14

Earlier quoted context omitted.

What does yet another gripe about generics in Go have to do with a tutorial written by an independent party, one that is about features in the language today ?

Same reason most posts about MongoDB for a long time had complaints about Mongo's uh . . . let's say "relaxed" . . . approach to durability. Because proponents of the language/system/idea tend to promote an unbalanced view of its quality, its detractors need to be there to give people on the fence the right dose of the bad medicine. Also, speaking only for myself, I really like the language and its ideas, but that on…

Go generics and Mongo durability in the same thread. There is a trifecta brewing here...

Re: Go by Example

#28
post #25

Earlier quoted context omitted.

Same reason most posts about MongoDB for a long time had complaints about Mongo's uh . . . let's say "relaxed" . . . approach to durability. Because proponents of the language/system/idea tend to promote an unbalanced view of its quality, its detractors need to be there to give people on the fence the right dose of the bad medicine. Also, speaking only for myself, I really like the language and its ideas, but that on…

Go generics and Mongo durability in the same thread. There is a trifecta brewing here...

Never underestimate the power of nitpicking in an HN thread.

Re: Go by Example

#29
post #14

Earlier quoted context omitted.

What does yet another gripe about generics in Go have to do with a tutorial written by an independent party, one that is about features in the language today ?

Same reason most posts about MongoDB for a long time had complaints about Mongo's uh . . . let's say "relaxed" . . . approach to durability. Because proponents of the language/system/idea tend to promote an unbalanced view of its quality, its detractors need to be there to give people on the fence the right dose of the bad medicine. Also, speaking only for myself, I really like the language and its ideas, but that on…

I tend to think that you and the rest of "Generics or death!" crowd make a disservice to your own cause when you lazily come and repeat the same arguments. The rest gets bored and frustrated. Yeah, we get it, you like generics, it makes sorting stuff easier, and you're repeating the same stuff over and over again for our own good because you are true altruists, etc. Can we get over that?

If there's another thread which talks about good and bad points of the Golang design then, by all means, bash the language as much as you like. But if there's something you don't like it doesn't mean you get a free pass to repeat yourself whenever something with Go in the title appears in HN, whatever it is. Context matters, you aren't helping anybody, just trolling.

Re: Go by Example

#30

It's Friday gents! No excuse to set aside Saturday and Sunday, you can easily go through these examples in two days and grok it. Go is that _slim_, and that's good! Guaranteed you'll find use for Go in one system or the other when you want easy deployment, fast development time and extreme speeds. :) (Disclaimer: I love Go and I hope it goes mainstream in a big way in 5 years)

Although no one seems to have this problem, golang (easier to google "golang" than "go") doesn't suffer from #ifndef guard problem which can make your large C++ app take hours to build http://talks.golang.org/2012/splash.slide#18. I mean if it were written in go it wouldn't take hours to build, and it would be clear which includes you really need. But people with large C++ code bases are probably--hey they have plenty of time to port code to golang while their large source code compiles.
Post reply on HN