Live data from Hacker News

The Go Programming Language by Brian W. Kernighan, Alan Donovan

amazon.com

131–140 of 264 posts

Re: The Go Programming Language by Brian W. Kernighan, Alan Donovan

#131
post #78

Earlier quoted context omitted.

Go's error handling is honestly the best I've ever used. No errors go unhandled. Period. get an error? Return it or deal with it. Makes much more sense than exceptions suddenly breaking the behaviour of the language.

It's not actually true that no errors go unhandled. func foo() error { return errors.New("whoa!") } func bar() { _ := foo() // onward! }

Uh yes? This is you telling the compiler specifically that you don't care about the error. It's equivalent to

    try {
        foo()
    catch {}
In other languages. That's not a problem, that's the computer doing what you explicitly told it to do.

Re: The Go Programming Language by Brian W. Kernighan, Alan Donovan

#132
post #83

Earlier quoted context omitted.

I agree. And not for nothing, I'm shipping production code, at a real company, with real customers, with real revenue (250m+). Here's the deal -- all programming languages are just tools. Go's great because it's small enough to keep in your head, and simple. It's fast. It promotes composition. And it has sane concurrency. And quite honestly, I am more productive for the things Go left out then it includes. That's not…

>>it's small enough to keep in your head This. And the additional effect is that you can keep more of the problem domain in your head as well. I've been in this game a long time, and my experience has been that the simpler the dev tools, the more likely the programmers working on a particular domain will be SME's in that domain.

SME?

Re: The Go Programming Language by Brian W. Kernighan, Alan Donovan

#133

Earlier quoted context omitted.

Error handling is something that I did get used to, especially considering that one can assign and check in an if-statement. Generics I still miss every single day. But not enough to stop using Go. It's pretty much C with interfaces, a garbage collector, and safety. What more can one wish for?

No garbage collector so I can actually use it in embedded situations.

I should stop using rhetorical questions :). But indeed, such embedded applications are not Go's domain.

Re: The Go Programming Language by Brian W. Kernighan, Alan Donovan

#134
post #83

Earlier quoted context omitted.

>>it's small enough to keep in your head This. And the additional effect is that you can keep more of the problem domain in your head as well. I've been in this game a long time, and my experience has been that the simpler the dev tools, the more likely the programmers working on a particular domain will be SME's in that domain.

SME?

Subject Matter Expert.

Re: The Go Programming Language by Brian W. Kernighan, Alan Donovan

#135

Earlier quoted context omitted.

I can't even believe this is the kind of comment that gets upvoted on HN nowadays. "Go was made by smart old people and is therefore good. If you don't understand it's good, you're stupid and I refuse to listen to you."

in addition to what logicallee said, it's common for inexperienced programmers to (poorly) "re-invent" concepts that were discovered in the past by those "smart old people". This is caused by a combination of factors, and one of them is the belief that one can solve a problem single-handedly without studying the fundamentals and previous strategies. Ignoring the work of the masters is a good way to start from scratch…

Sometimes, it's also a way to invent things that were considered impossible.

Re: The Go Programming Language by Brian W. Kernighan, Alan Donovan

#136
post #26

Go, with its simplicity, is a gift from the generation of masters to today's professionals, but many of today's professionals appear too ignorant to see the wisdom of the language. It used to drive me crazy when I would read negative comments in r/programming and HN, but I don't even pay attention to the negative comments anymore. The adoption is far better than I was afraid it was going to be.

You mention the key point of Go: simplicity. I think many developers tend to underestimate the power of simplicity and overestimate the power of certain features. Every single abstraction has a price in complexity. This is why Lisp, being a super powerful language invented in the 1950s never got widely used. Even when the syntax is simple, the conceptual complexity of the language is quite big. Same thing happens wit…

Not that I can completely disagree with your point, but there are many reasons outside of the intrinsics of a programming language that can and will influence ones success.

The marketting muscle that was put behind Java certainly helped it in its time. Same for the actual market that backs objective c.

C probably benefited as much from the open distribution as it did anything else. Combined with a relatively high quality compiler that was heavily distributed (gcc), this can not be understated. The only languages that were as highly distributed were probably the various BASICs, and there are obvious reasons to fall off of those at some point.

So, you can blame lisp's lack of popularity on its complexity. I am not so sure that is a good foundation, though. I feel it is as much lack of a high quality distribution of it as it is anything else.

Though, highly on topic, it should probably be noted that the approachability of the original C Programming Language book that is making so many people excited about this book probably had a very heavy influence, as well. I am not so sure a book can have as heavy of an influence in today's environment, but I think it would be foolish to discount the amount of influence a publication like this could have had back in the day.

Re: The Go Programming Language by Brian W. Kernighan, Alan Donovan

#138
post #26

Go, with its simplicity, is a gift from the generation of masters to today's professionals, but many of today's professionals appear too ignorant to see the wisdom of the language. It used to drive me crazy when I would read negative comments in r/programming and HN, but I don't even pay attention to the negative comments anymore. The adoption is far better than I was afraid it was going to be.

I think it's rather the height of hubris to accuse your contemporaries of being "ignorant" because they disagree with your assessment of this particular tool. Go is an interesting shift in language design, basically discarding many modern trends and techniques and returning to a much simpler paradigm. It's a totally valid approach with lots of merit — complexity can be a killer. In addition, the concurrency primitive…

In an essay titled "Why Pascal is Not My Favorite Programming Language"[1] Brian W. Kernighan wrote:

  The size of an array is part of its type
  If one declares

     var     arr10 : array [1..10] of integer;
             arr20 : array [1..20] of integer;

  then arr10 and arr20 are arrays of 10 and 20 integers
  respectively. Suppose we want to write a procedure 'sort' to 
  sort an integer array. Because arr10 and arr20 have 
  different types, it is not possible to write a single 
  procedure that will sort them both.

  The place where this affects Software Tools particularly,
  and I think programs in general, is that it makes it 
  difficult indeed to create a library of routines for doing 
  common, general-purpose operations like sorting. 
People who complain about the lack of generics in Go are making the same argument that Kernighan made against Pascal viz. that it is tedious to write library code in the language.

EDIT: Also it is not uncommon for a feature that is deemed essential by some to be thought of as adding too much complexity by others. For example,

  "I've seen [visual] editors like that, but I don't 
  feel a need for them. I don't want to see the state 
  of the file when I'm editing."
said Ken Thompson [2] when comparing line editors like ed to visual editors like vi or emacs.

[1]: http://www.lysator.liu.se/c/bwk-on-pascal.html

[2]: http://web.archive.org/web/20080103071208/http://www.dcs.qmu...

Re: The Go Programming Language by Brian W. Kernighan, Alan Donovan

#139
post #136

Earlier quoted context omitted.

You mention the key point of Go: simplicity. I think many developers tend to underestimate the power of simplicity and overestimate the power of certain features. Every single abstraction has a price in complexity. This is why Lisp, being a super powerful language invented in the 1950s never got widely used. Even when the syntax is simple, the conceptual complexity of the language is quite big. Same thing happens wit…

Not that I can completely disagree with your point, but there are many reasons outside of the intrinsics of a programming language that can and will influence ones success. The marketting muscle that was put behind Java certainly helped it in its time. Same for the actual market that backs objective c. C probably benefited as much from the open distribution as it did anything else. Combined with a relatively high qua…

I don't think GCC can take any credit for C becoming a popular language. GCC 1.0 was only released in 1987, and prior to that most people were stuck using proprietary compilers. I would rather say C succeeded because it was tied to Unix, and Unix was very successful.

GCC certainly contributed to C continuing to be widely used.

Re: The Go Programming Language by Brian W. Kernighan, Alan Donovan

#140
post #136

Earlier quoted context omitted.

Not that I can completely disagree with your point, but there are many reasons outside of the intrinsics of a programming language that can and will influence ones success. The marketting muscle that was put behind Java certainly helped it in its time. Same for the actual market that backs objective c. C probably benefited as much from the open distribution as it did anything else. Combined with a relatively high qua…

I don't think GCC can take any credit for C becoming a popular language. GCC 1.0 was only released in 1987, and prior to that most people were stuck using proprietary compilers. I would rather say C succeeded because it was tied to Unix, and Unix was very successful. GCC certainly contributed to C continuing to be widely used.

My feeling is that it is fair to say that gcc contributed to linux existing, and linux has had a large positive influence on c's current life.

That said, you are definitely correct in C's early popularity. And that probably contributes more heavily than later items. (There is a term for this, but I can't remember it right off.)

Post reply on HN