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
The Go Programming Language by Brian W. Kernighan, Alan Donovan
151–160 of 264 posts
Re: The Go Programming Language by Brian W. Kernighan, Alan Donovan
#152Anyone 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)
Re: The Go Programming Language by Brian W. Kernighan, Alan Donovan
#153Earlier 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…
So, something like that?
Interfaces, man. They're better than you think.
Re: The Go Programming Language by Brian W. Kernighan, Alan Donovan
#154Go, 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…
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
#155Earlier 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.
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
#156Earlier 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…
Re: The Go Programming Language by Brian W. Kernighan, Alan Donovan
#157Anyone 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.
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
#158In 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…
Programming languages are a means, not the end!
Re: The Go Programming Language by Brian W. Kernighan, Alan Donovan
#159Earlier 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).
Re: The Go Programming Language by Brian W. Kernighan, Alan Donovan
#160Go, 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…
As a fellow Go coder, I'm actually stunned how much I can get done without a debugger nowadays.