News for hackers. Stuff that matters.
Re:Google’s Go has some coders raving by ominous_prime on Thursday May 30, 2013 @11:01AM (#5792920)
my rant re: generics, I wish people would read through the documentation (FAQ) and discussion of this first.

The language designers have not ruled out generics, and are fully open to providing them at some point. The issue is that they have yet to find an implementation that fits within the language design goals.

Yes, if you jump on the mailing list, and propose that they somehow "use" .NETs generics, and you actually have no idea how that would be implemented, or impact the compiler and runtime, you're not going to be greeted cordially. This happens fairly frequently, and is probably why people think the community is totally against generics.

The Go team wants generics, when they find the right way to handle them within the language. In the meantime, most heavy users seem to agree that lack of generics is better than poor generics.

Re:Google’s Go has some coders raving by quatrevingts on Thursday May 30, 2013 @11:41AM (#5793163)
I am highly skeptical that they are actively investigating ways to support generics, or that they are willing to change anything else about the language to support them better.

This statement, part of the standard Go talking points, seems to be designed to persuade the unsure to give the language a chance, "and generics will be around later once we figure it out." Not likely.

I think the designers know that no perfect shining implementation of generics--compatible with all of Go's existing design decisions--is going to arise deus ex machina after eluding researchers for all these years.

Re:Google’s Go has some coders raving by ominous_prime on Thursday May 30, 2013 @11:52AM (#5793225)
I would like to believe that the go team members aren't being disingenuous when they say this.

There has been some talk, but it's mixed in with a lot of noise too.

I don't think that anyone is expecting a PL research breakthrough to provide some generics panacea. I think this is more along the lines of how can we pragmatically introduce generics without messing up too bad. From what I've seen, I personally think some form of templating has the most promise (though I am far from qualified to actually comment on its viability).

Re:Google’s Go has some coders raving by papsosouid on Thursday May 30, 2013 @02:43PM (#5794367)
>I don't think that anyone is expecting a PL research breakthrough to provide some generics panacea

That already happened. In 1976. There is simply no excuse for this disingenuous "oh but go is magic and special and can't do it the same way everyone else can" nonsense. If people want that argument to be taken seriously, then they need to start offering actual specific problems with parametric polymorphism as it would apply to go. Not just saying "we're special".

Re:Google’s Go has some coders raving by ominous_prime on Thursday May 30, 2013 @03:12PM (#5794573)
No one is saying generics can't be implemented in go, or that go is "special".

Implementing generics requires tradeoffs of some sort -- compile-time and size, runtime efficiency, or language-complexity. The creators didn't want to accept any of these compromises, at least for the initial release of go.

Re:Google’s Go has some coders raving by papsosouid on Thursday May 30, 2013 @03:38PM (#5794706)
No, it does not require a trade off. That is exactly what I just pointed out. There is no such problem. Parametric polymorphism was solved in 1976. None of the things you mentioned are actual problems, they simply do not exist. Those are invented excuses. If Rob seriously still hasn't bothered to read CS papers from 30+ years ago, that is very unfortunate. But it does not mean the problem wasn't solved, it just means he is unaware of the solution.
Re:Google’s Go has some coders raving by Daishiman on Thursday May 30, 2013 @07:22PM (#5795898)
I'm more willing to trust Rob Pike on his assesment than a random Internet comment from someone who has neither knowledge of Go nor has read the comments on their mailing list.
Re:Google’s Go has some coders raving by azth on Thursday May 30, 2013 @09:31PM (#5796352)
Appeal to authority. You don't have to trust some random comment on the Internet. Read a little about how generics are implemented in other languages today, and you will be able to see the points the commenter is making.
Re:Google’s Go has some coders raving by Daishiman on Friday May 31, 2013 @02:27AM (#5797215)
An appeal to authority is not an argumentative fallacy if the authority is, umm, actually qualified to talk about whatever they're saying. There are at most a couple dozen people more qualified and able to talk about the upsides and downsides of programming languages who, moreover, have seen them in action in the course of several decades of computing history (much of which was directly due to this man's actions).

Really, if you have a language, compiler, and operating systems designer of the caliber of Rob Pike saying that generics introduce a lot of issues, I'm going to need some damned good evidence to the contrary.

Re:Google’s Go has some coders raving by papsosouid on Friday May 31, 2013 @09:38AM (#5798484)
Yes, it is still a fallacy. If you have an argument, you can make it without trying to rely on "famous person X agrees". And you seem to be confused about who Rob Pike is. He simply worked at bell labs. After everything important had already happened. He had nothing to do with the creation of unix or C, he just gets lumped in with them because he was at bell labs after the fact.
Re:Google’s Go has some coders raving by Daishiman on Friday May 31, 2013 @01:46PM (#5800058)
From Wikipedia:

"He also co-developed the Blit graphical terminal for Unix; before that he wrote the first window system for Unix in 1981. Pike is the sole inventor named in AT&T's US patent 4,555,775 or "backing store patent" that is part of the X graphic system protocol and one of the first software patents. [1]

Over the years Pike has written many text editors; sam and acme are the most well known and are still in active use and development.

Pike, with Brian Kernighan, is the co-author of The Practice of Programming and The Unix Programming Environment. With Ken Thompson he is the co-creator of UTF-8. Pike also developed lesser systems such as the vismon program for displaying images of faces of email authors."

Yeah, some amateur engineering right there. My point still stands; heuristically I have every reason to believe an extremely competent arquitect and designer who is involved in good faith on this project over a random commententer who can't be bothered to assess the evidence.

Re:Google’s Go has some coders raving by azth on Friday May 31, 2013 @04:59PM (#5801350)
It seems to me that Pike and gang are mainly coming from a C background. They loathe C++ and Java. Take a look at the SPLASH talk linked in another comment here, and see how the "pain points" mentioned either apply mainly to C and C++ (dependency issues, build times in the case of the latter), or are independent of the language in general (like poor documentation). Then at least 4 sections on that page are just related to dependencies and build times (about 1/3rd of the entire article).

No one is denying that C and C++ have many problems. At the same time though, many of those problems have been solved in other languages (both older and newer than C++).

Re:Google’s Go has some coders raving by papsosouid on Friday May 31, 2013 @03:18PM (#5800753)
Did you seriously not notice how nothing in your list of accomplishments is even remotely relevant? We're talking about programming language research, and Pike's experience in that area is seriously lacking.

You don't need to believe anyone, that is the whole point. You are trying to turn it into "some guy's opinion vs the glorious and all-knowing rob's opinion". It is not a question of opinion, it is one of fact. Again, this problem was solved in 1976. ML is very old. Go read the papers on parametric polymorphism.

Re:Google’s Go has some coders raving by pkroll on Thursday May 30, 2013 @09:56PM (#5796433)
Quick searches turn up slow compile times as a definite issue with generics. Which means papsosouid's premise is wrong: there IS an issue, and it's one of the ones the Go team considers important. EDIT: read name wrong.
Re:Google’s Go has some coders raving by azth on Thursday May 30, 2013 @10:16PM (#5796492)
It has been claimed by the D people that D compiles faster than Go. D has a very powerful generic/template system -- even more powerful than C++. Yet, they seem to have solved the compile speed problem, while preserving runtime types (it is a systems language after all).

As I mentioned in another comment in this thread, I have a feeling that the issue with generics in Go is how some language features interact with each other (and not in a good way). Mainly interfaces and object composition. I think this is a good indication that the authors were not aware of several developments in language design at the time of making Go. Not everything is a tradeoff all the time. Certain problems have been solved.

Re:Google’s Go has some coders raving by papsosouid on Friday May 31, 2013 @11:33AM (#5799188)
>Quick searches turn up slow compile times as a definite issue with generics

Where? I can find nothing of the sort. And given that we have proof otherwise (compare D to go for example) it seems likely that you are choosing to interpret "some languages made their compilers slower" with "parametric polymorphism must make a compiler slower".

Re:Google’s Go has some coders raving by azth on Friday May 31, 2013 @04:52PM (#5801320)
On the Go mailing list I suppose :) They (the authors) seem that they did not research this issue deeply enough as you mentioned.
Re:Google’s Go has some coders raving by Avshalom on Thursday May 30, 2013 @11:39AM (#5793152)
> In the meantime, most heavy users seem to agree that lack of generics is better than poor generics.

most heavy users are self selected.

Re:Google’s Go has some coders raving by jlgreco on Thursday May 30, 2013 @02:40PM (#5794344)
Is there a problem with that? I expect you would find that most baseball players don't find baseball boring, and most nascar drivers don't think that their sport is low-tech to a fault.

Outsiders may have suggestions for improvements, they may even be outsiders because they would like to see those suggestions realized, but when is that ever not the case?

Re:Google’s Go has some coders raving by cma on Thursday May 30, 2013 @11:26AM (#5793075)
Seems like a big trap; they will get bolted on after much of the std library is frozen without them.
Re:Google’s Go has some coders raving by ominous_prime on Thursday May 30, 2013 @11:42AM (#5793164)
Well then it would already be too late, since the std lib has been frozen since go1. As long as things are added in a backwards compatible way, there's no problem though.

Plus, something of this magnitude may need to be in a theoretical go2, so they can break whatever needs to be broken.

Re:Google’s Go has some coders raving by coldtea on Thursday May 30, 2013 @05:39PM (#5795423)
>The language designers have not ruled out generics, and are fully open to providing them at some point. The issue is that they have yet to find an implementation that fits within the language design goals.

That's the party line. And I, for one, don't believe that.

Go has been going for what, 3 years? And a couple more internally IIRC. And not only they came up with nothing with regard to generics as of now, there's also no research or initiative has been started that anybody knows of.

So how exactly are they supposed to "find an implementation that fits within the language design goals"? By some kind of satori?