News for hackers. Stuff that matters.
Re:Go by Example by bsg75 on Friday January 17, 2014 @10:08AM (#7076105)
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 ?
Re:Go by Example by jamesaguilar on Friday January 17, 2014 @12:09PM (#7076916)
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 by Shamanmuni on Friday January 17, 2014 @12:40PM (#7077141)
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 by jamesaguilar on Friday January 17, 2014 @01:42PM (#7077597)
I would surely never take these complaints to a go-specific discussion board. That would be disruptive and rude. But this site is not that. I will react to stories on here as pleases me, and it pleases me to constructively criticize certain go design choices sometimes when the subject comes up.
Re:Go by Example by Shamanmuni on Friday January 17, 2014 @02:11PM (#7077761)
You don't fool anybody, the subject didn't come up untill you brought it. The thread is about a site that shows examples of Go code and explains them, there's no discussion about the advantages or disadvantages of their design decisions, just matter of fact statements.

Of course, you can do whatever you want, but that doesn't mean that the rest of us won't probably look at your comments thinking "Here come the generics whiners again" and look in the other direction. You are alienating your audience with your indiscriminate repetition.

And, if the disclaimer helps you, I'd like generics in Go, they are useful sometimes. I just don't see the point in such zealotry over something which is merely convenient.

Re:Go by Example by 0xdeadbeefbabe on Friday January 17, 2014 @02:35PM (#7077917)
If only there were a workaround for not having generics, sigh.

But seriously, they may not implement generics out of spite or just to troll generics zealots.

Edit: remove ambiguity

Re:Go by Example by dvirsky on Friday January 17, 2014 @05:14PM (#7078811)
I recently added the statement "type T interface{}" to a piece of code, as a private joke about the generics-in-go talk.

now my code looks like "func map(x []T, f func(T) T)" and everybody's happy :)

Re:Go by Example by earthboundkid on Friday January 17, 2014 @08:52PM (#7079680)
I firmly believe that when Go introduces generics, the syntax should look like:

type T1 generic type T2 generic

func Map(f func(T1) T2, s []T1) []T2

Re:Go by Example by jamesaguilar on Friday January 17, 2014 @02:58PM (#7078053)
I'm not sure what you think I'm trying to fool people about. When Go comes up, I sometimes want to talk about how good I think it is. I hope you don't think I'm trying to hide that. It is pretty common on HN to comment on the merits of a thing when the thing itself comes up, even if said merits are not the specific subject of the link.

I can see that I am putting some people off with my commentary, but other people apparently got new information. Hard to say whether this is a win or loss on net. Time will tell, sooner or later.

Re:Go by Example by bsg75 on Friday January 17, 2014 @12:24PM (#7077039)
Go generics and Mongo durability in the same thread. There is a trifecta brewing here...
Re:Go by Example by sehr on Friday January 17, 2014 @12:40PM (#7077140)
Never underestimate the power of nitpicking in an HN thread.
Re:Go by Example by jamesaguilar on Friday January 17, 2014 @01:24PM (#7077457)
It is amusing that you consider either generics or durability to be "nitpicks." One is a feature that is present in almost every static language of at least the last two decades, and another is a fundamental need of most database users, relational or not. Unless by nitpick you mean, "something I personally don't care about," I think your nitpick-classifier is a bit busted.
Re:Go by Example by sehr on Friday January 17, 2014 @02:32PM (#7077897)
I don't consider the features (or lack thereof) to be nitpicks. They are valid criticisms, but they have had their own very extensive discussions, and we are all very aware of them.

Bringing that into a thread regarding a very cool set of examples regarding the core features of the language, isn't very constructive (at least IMO).

Re:Go by Example by jamesaguilar on Friday January 17, 2014 @02:37PM (#7077934)
Ah. I see where our disagreement comes from. I do not believe that everyone is very aware of these issues. I believe go users are, but since this entire thread is evangelistic, there are people here who are not currently go users who are not aware. The exclamations of surprise at my provided example are proof enough of this for my satisfaction.
Re:Go by Example by justin66 on Friday January 17, 2014 @05:24PM (#7078876)
You do realize that people who look at the tutorial will discover the lack of generics on their own, right? And that if they share the "my God, lack of generics is a war crime!" attitude, they're bound to discover it literally right away?
Re:Go by Example by jamesaguilar on Friday January 17, 2014 @05:35PM (#7078930)
This argument can equally be used to protest the saying of anything good about the language, since obviously people who try the language will discover this good thing quickly if it's useful. This is not a compelling argument to me.
Re:Go by Example by hdevalence on Friday January 17, 2014 @10:29AM (#7076222)
It was in response mainly to:

> Go is that _slim_, and that's good! Guaranteed you'll find use for Go in one system or the other...

I'm all for learning new programming languages, but if you're going to learn a new programming language, why not use one that has new ideas?

Re:Go by Example by bsg75 on Friday January 17, 2014 @11:19AM (#7076539)
Go does not have a lot of new features, but mostly a specific collection of convenient ones (static compilation, GC, etc.) Not sure how many new languages have truly new features, vs. how many are improvements in productivity (human and machine).

My point is that generics are not a new idea either, and plenty of languages offer them. Go is not meant (anymore) to replace C/C++/Java or even Rust. It will never have all the features of those, and probably should not.

But it seems impossible to have a HN discussion on Golang without part of the thread getting hijacked with "But generics!!!" This make no more sense to me than considering other languages incomplete because they don't generate static binaries.

Re:Go by Example by masklinn on Friday January 17, 2014 @01:52PM (#7077645)
> But it seems impossible to have a HN discussion on Golang without part of the thread getting hijacked with "But generics!!!"

Surely the exact same criticism could be leveraged at go proponents pointing out the exact same features they love every time, should discussions of Go simply stop until the next major release, and only new features (if any) be discussable?

Re:Go by Example by burntsushi on Friday January 17, 2014 @05:58PM (#7079055)
> Surely the exact same criticism could be leveraged at go proponents pointing out the exact same features they love every time

This thread was started by someone complaining about lack of generics.

> should discussions of Go simply stop until the next major release, and only new features (if any) be discussable?

Why? Because there's no reasonable middle ground between "don't ever talk about Go until there's a release" and "hijack every thread about Go"?

Re:Go by Example by bsg75 on Friday January 17, 2014 @04:40PM (#7078603)
Note my point in that line was not about criticism, but about thread hijacking.
Re:Go by Example by ckarmann on Friday January 17, 2014 @02:36PM (#7077924)
Learning languages for their new ideas is fine, but there are other reasons you might want to learn a language. For example, because it is a good language for the specific kind of program that you want to write.

Go hits some sweet spot, apparently, since some people are happier using it than anything else they had tried. If no "new ideas" are going to help them, why should they chose more "innovative" languages instead of Go?

Re:Go by Example by genwin on Friday January 17, 2014 @01:26PM (#7077479)
Because it's much faster than other languages at its difficulty level. Which can save a lot of money.