Live data from Hacker News

Maybe adding generics to Go is about syntax after all

dave.cheney.net

41–50 of 92 posts

Re: Maybe adding generics to Go is about syntax after all

#41

Earlier quoted context omitted.

Why thankfully?

Because syntax actually does matter, and Lisp is only a local maximum. Thinking otherwise causes pain, as people try to use Lisp in situations where it is not the best answer, and is therefore harder to use than other languages. So, "thankfully", because acknowledging reality here means not having to live with the pain of using a language that is sub-optimal for the problem you're working on.

This is overstating the case for syntax. Without any empirical evidence that syntax is important to anyone other than folks that draft up syntax rules, this is just an assertion.

Put another way, do you have evidence that it is important? Has it let people write better programs? How would you prove that?

This is akin to saying grammar is important. It is, to an extent; but over adherence to grammar is usually not an effective way to communicate.

Re: Maybe adding generics to Go is about syntax after all

#42
post #26
post #12

Earlier quoted context omitted.

Go has a lot of pain points but the one positive thing it has over other languages is how it handles interfaces. The whole point is that the caller can make new interfaces to fit existing structs in other libraries.

Nothing new, ML derived languages also allow for it.

[deleted]

Re: Maybe adding generics to Go is about syntax after all

#43

I was at Gophercon and saw Russ's video where he spent 30 seconds explaining what generics were to the audience and showed a half-baked example of the syntax they are considering. I've been using Go for almost 5 years now and have no desire to see generics introduced. It would ruin what is currently a very simple and easy-to-use language. Am I the only one who is hoping this whole thing fizzles out?

It's the number one reason I tried out but wouldn't return and do anything serious in the language. And I'm not the only one.

Re: Maybe adding generics to Go is about syntax after all

#44
post #15

Earlier quoted context omitted.

I tinkered a bit (as many others have too!) with a lisp syntax for C, just to see what it'd feel like. That is, exact C semantics (so not inventing anything) but sexpressions. What I remember struggling with is that it was surprisingly kind of hard to remember when parens are necessary where. For example you might define an if statement: (if (> x 3) (printf ...)) Looks nice, but what about if you want multiple things…

Or "if" could be a special form so that you can just write (if (> x 3) (printf a) (printf b))

WHEN takes an implicit PROGN like that (so does UNLESS). IF can't because it needs to delimit the then-form from the else-form somehow.

http://clhs.lisp.se/Body/m_when_.htm

Re: Maybe adding generics to Go is about syntax after all

#45

I was at Gophercon and saw Russ's video where he spent 30 seconds explaining what generics were to the audience and showed a half-baked example of the syntax they are considering. I've been using Go for almost 5 years now and have no desire to see generics introduced. It would ruin what is currently a very simple and easy-to-use language. Am I the only one who is hoping this whole thing fizzles out?

Yes, the people who want generics are either people who don't use Go, or don't understand the purpose of Go and the implications of adding them to the language.

Re: Maybe adding generics to Go is about syntax after all

#46
post #41

Earlier quoted context omitted.

Because syntax actually does matter, and Lisp is only a local maximum. Thinking otherwise causes pain, as people try to use Lisp in situations where it is not the best answer, and is therefore harder to use than other languages. So, "thankfully", because acknowledging reality here means not having to live with the pain of using a language that is sub-optimal for the problem you're working on.

This is overstating the case for syntax. Without any empirical evidence that syntax is important to anyone other than folks that draft up syntax rules, this is just an assertion. Put another way, do you have evidence that it is important? Has it let people write better programs? How would you prove that? This is akin to saying grammar is important. It is, to an extent; but over adherence to grammar is usually not an…

Well, empirically, syntax is important to a large number of programmers who complain about Lisp's (lack of) syntax. That's not a rigorous empirical study, but it's the best I can do at the moment...

Re: Maybe adding generics to Go is about syntax after all

#47

I was at Gophercon and saw Russ's video where he spent 30 seconds explaining what generics were to the audience and showed a half-baked example of the syntax they are considering. I've been using Go for almost 5 years now and have no desire to see generics introduced. It would ruin what is currently a very simple and easy-to-use language. Am I the only one who is hoping this whole thing fizzles out?

Yes, the people who want generics are either people who don't use Go, or don't understand the purpose of Go and the implications of adding them to the language.

Exactly. Say goodbye to fast compiles and easy-to-read code. Not to mention the muddy waters that will result from having both interfaces and generics together.

Re: Maybe adding generics to Go is about syntax after all

#48
post #41

Earlier quoted context omitted.

This is overstating the case for syntax. Without any empirical evidence that syntax is important to anyone other than folks that draft up syntax rules, this is just an assertion. Put another way, do you have evidence that it is important? Has it let people write better programs? How would you prove that? This is akin to saying grammar is important. It is, to an extent; but over adherence to grammar is usually not an…

Well, empirically, syntax is important to a large number of programmers who complain about Lisp's (lack of) syntax. That's not a rigorous empirical study, but it's the best I can do at the moment...

I assert most programmers have not been exposed to lisp. I further assert most that complain of it's lack of syntax have not used it in any capacity.

I would be interested in studies on this. Most I ever see is posturing and assertions with little to no evidence. Frustrating, because I think both sides have valid points. And I fully believe there is a learning curve both ways. I suspect they both converge on total ability. I am genuinely interested in ideas on how that could be explored.

Re: Maybe adding generics to Go is about syntax after all

#49

I was at Gophercon and saw Russ's video where he spent 30 seconds explaining what generics were to the audience and showed a half-baked example of the syntax they are considering. I've been using Go for almost 5 years now and have no desire to see generics introduced. It would ruin what is currently a very simple and easy-to-use language. Am I the only one who is hoping this whole thing fizzles out?

It's the number one reason I tried out but wouldn't return and do anything serious in the language. And I'm not the only one.

There are numerous successful "serious" projects written in Go!

Re: Maybe adding generics to Go is about syntax after all

#50

I was at Gophercon and saw Russ's video where he spent 30 seconds explaining what generics were to the audience and showed a half-baked example of the syntax they are considering. I've been using Go for almost 5 years now and have no desire to see generics introduced. It would ruin what is currently a very simple and easy-to-use language. Am I the only one who is hoping this whole thing fizzles out?

Yes, the people who want generics are either people who don't use Go, or don't understand the purpose of Go and the implications of adding them to the language.

Great way here to completely discount the criticisms of people who've used the language and found it unacceptable how often you have to escape out of the type system of a "safe" language with `interface{}`.
Post reply on HN