http://www.paulgraham.com/avg.html Programmers get very attached to their favorite languages, and I don't want to hurt anyone's feelings, so to explain this point I'm going to use a hypothetical language called Blub. Blub falls right in the middle of the abstractness continuum. It is not the most powerful language, but it is more powerful than Cobol or machine language. And in fact, our hypothetical Blub programmer w…
I'm not sure what your point is, whether you think go is simple and powerful like lisp, or the new java, but simply quoting "The Blub Paradox" makes you sound pretentious (on a site where the largest percentage of readers are probably already familiar with said essay nonetheless). I don't think this is really applicable to the article anyway, since it's an article commenting on two very different languages and progra…
Replacing Clever Code with Unremarkable Code in Go
21–30 of 140 posts
Re: Replacing Clever Code with Unremarkable Code in Go
#22I didn't put much code into the article, but ask me if you'd like more details on exactly what I'm talking about -- in terms of real code.
A little off-topic, but could you give some (Perl) code examples of this: > You feel initiated into an inner circle. You feel like you’ve discovered LISP in an alternate dimension (but you haven’t).
Re: Replacing Clever Code with Unremarkable Code in Go
#23Re: Replacing Clever Code with Unremarkable Code in Go
#24I didn't put much code into the article, but ask me if you'd like more details on exactly what I'm talking about -- in terms of real code.
Like this, I presume: go func(){ for { select { case
I've definitely wanted this in other languages where I'm using thread safe queues for communication, and had to do manual multiplexing into a new queue whenever I wanted to do a blocking get on multiple queues.
Does anyone know of a convenient way to do this when handling multiple instances of python's Queue or similar with Haskell's Chan?
Re: Replacing Clever Code with Unremarkable Code in Go
#25I didn't put much code into the article, but ask me if you'd like more details on exactly what I'm talking about -- in terms of real code.
A little off-topic, but could you give some (Perl) code examples of this: > You feel initiated into an inner circle. You feel like you’ve discovered LISP in an alternate dimension (but you haven’t).
$_=@_%*!8%#9(
Re: Replacing Clever Code with Unremarkable Code in Go
#26I think this is one of the really great things about Go. Some detractors ask "There is so much to be gained by having generics! What would be lost if Go had generics? Nothing! Ergo, Go is wrong to not have generics". This line of argument is flawed. Go curbs the ability of people to write crazy (and ultimately mentally expensive) abstractions. The lack of generics in Go is very a good thing. Especially when it comes…
Limiting power was the argument for making Java crippled too. On the topic of generics specifically, parametric polymorphism actually makes code simpler, see e.g. Haskell.
Re: Replacing Clever Code with Unremarkable Code in Go
#27Earlier quoted context omitted.
Limiting power was the argument for making Java crippled too. On the topic of generics specifically, parametric polymorphism actually makes code simpler, see e.g. Haskell.
Whether by design or accident, Go is filling the use case of "you tried Python but performance wasn't good enough". People will bring up cases like "you can't write a generic map function, or tree data structures!", but Go isn't the language for those things. In Go, you would just use a for loop or a dictionary-based map. If your program gets to the point where that no longer cuts it, then it's time to move on to a d…
Bear in mind that with the new release of Go, maps are already hand specialized for primitives.
Re: Replacing Clever Code with Unremarkable Code in Go
#28I think this is one of the really great things about Go. Some detractors ask "There is so much to be gained by having generics! What would be lost if Go had generics? Nothing! Ergo, Go is wrong to not have generics". This line of argument is flawed. Go curbs the ability of people to write crazy (and ultimately mentally expensive) abstractions. The lack of generics in Go is very a good thing. Especially when it comes…
Re: Replacing Clever Code with Unremarkable Code in Go
#29Earlier quoted context omitted.
A little off-topic, but could you give some (Perl) code examples of this: > You feel initiated into an inner circle. You feel like you’ve discovered LISP in an alternate dimension (but you haven’t).
I'm not the author, and I don't know much Perl either, but I imagine something like this: $_=@_%*!8%#9(
Re: Replacing Clever Code with Unremarkable Code in Go
#30Earlier quoted context omitted.
Like this, I presume: go func(){ for { select { case
Nice. I still haven't given Go much time, but I really like this form, where you can switch on multiple blocking calls. I've definitely wanted this in other languages where I'm using thread safe queues for communication, and had to do manual multiplexing into a new queue whenever I wanted to do a blocking get on multiple queues. Does anyone know of a convenient way to do this when handling multiple instances of pytho…