Live data from Hacker News

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

amazon.com

151–160 of 264 posts

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

#151

Earlier quoted context omitted.

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…

In a funny twist of history, Kernighan is now writing a book on a language where the length of an array is part of its type: http://play.golang.org/p/jrbSgKFZ_1

Technically true, but the point is that arrays were the only collection type in Pascal, whereas Go also has slices (which, in my experience, outnumber arrays 10-1 in most codebases).

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

#152
post #49

Anyone know if Kernighan has written a lot of Go code himself, or is he onboard more for his technical writing skills? (There's the Bell Labs connection of course)

I spoke to Kernighan about it a few days ago, and he seemed to be doing a good amount of go development.

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

#153

Earlier quoted context omitted.

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…

http://golang.org/pkg/sort/#Sort

So, something like that?

Interfaces, man. They're better than you think.

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

#154
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…

"Ignorance is not a prerequisite for disagreement."

This is a very memorable and useful quote. Thanks for saying it. It deserves to be a classic, in my opinion.

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

#155
post #104
post #67

Earlier quoted context omitted.

> Even when the syntax is simple, the conceptual complexity of the language is quite big. Lisp is a very simple language conceptually. The problem is that it allows you to build insane amounts of complexity in a very "free for all" way. No "one sane default way to do it". The problem is now how complex a language is , but how much needless complexity it allows you to build yourself . Go seems great because it doesn't…

Are you talking about Common Lisp, or are you talking about Scheme? Common Lisp does provide primitives for just about everything, in ridiculously generic forms. Scheme forces you to code it yourself.

> Common Lisp does provide primitives for just about everything

Most of it are not primitives though, Common Lisp only defines 25 special forms. Guess how many keywords Go has?

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

#156
post #54
post #39

Earlier quoted context omitted.

Maybe part of the problem is that people that promote Go in some capacity will at times make good arguments for certain things, but when they find something that they can't really explain, or that might seem subpar, they devolve their argument into some kind of appeal to authority - 'who am I to question their decisions. These are experienced, respected programmers with a lot of accomplishments. Who are anyone born a…

You might find this interesting: http://www.reddit.com/r/programming/comments/2wy2qe/gos_comp... , my reply to someone's question about what is interesting and/or unique about Go. A bit much to just copy & paste in here, probably. While so many people are complaining about what it doesn't have, there are things it does have that, while not individually unique, are actually packaged into a unique bundle. Particularly…

Thanks. That was a good comment.

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

#157
post #49

Anyone know if Kernighan has written a lot of Go code himself, or is he onboard more for his technical writing skills? (There's the Bell Labs connection of course)

He and Rob Pike have written a few books together, that's likely the main connection. I follow the Go community fairly closely and hadn't heard of Kernighan in connection with Go, but he may also not be advertising his use of it.

kernighan also wrote the tutorial on the Limbo programming language:

http://doc.cat-v.org/inferno/4th_edition/limbo_language/desc...

he's obviously good at it, and the perspective of someone not involved with the creation of the language is a bonus.

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

#158

In my personal view, I find it disappointing that someone like Brian Kernighan, as a co-author of C, only got as far as Go. I would have loved it much more to see him working on a language like Rust, that actually seems to point to the future of programming languages (or does its best at it), while Go looks like a stopgap and a dead end right from the beginning. Go seems a fine piece of engineering in so far as it di…

Go and Rust are allies, not enemies. Rust is a language driven by a goal, not by blind ideology, and that goal is to make the world a safer place by leveraging memory safety in a low-level context. Given that Go is also memory safe in its default configuration, any C or C++ service that is rewritten in Go still has the effect of making the world a safer place.

Programming languages are a means, not the end!

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

#159

Earlier quoted context omitted.

In a funny twist of history, Kernighan is now writing a book on a language where the length of an array is part of its type: http://play.golang.org/p/jrbSgKFZ_1

Technically true, but the point is that arrays were the only collection type in Pascal, whereas Go also has slices (which, in my experience, outnumber arrays 10-1 in most codebases).

When did Pascal gain dynamic arrays?

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

#160
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 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…

"That's not to say Go is perfect (e.g. a 'real' debugger option)"

As a fellow Go coder, I'm actually stunned how much I can get done without a debugger nowadays.

Post reply on HN