Live data from Hacker News

Replacing Clever Code with Unremarkable Code in Go

vividcortex.com

1–10 of 140 posts

Re: Replacing Clever Code with Unremarkable Code in Go

#4
I 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 to collaborating on a large unfamiliar code base.

I have been productive in Go and haven't missed the ability to write generic code so far. Usually it turns out there is another way to achieve what you want without them. If there isn't, maybe I'm trying to solve the wrong problem, or it is the wrong language for the task.

Re: Replacing Clever Code with Unremarkable Code in Go

#5
post #2

I 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.

The climber in the gif, BTW, is Jyoti Raju:

http://en.wikipedia.org/wiki/Jyoti_Raju

http://www.youtube.com/watch?v=BPN3gLVDsOY

Re: Replacing Clever Code with Unremarkable Code in Go

#6
post #2

I 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.

Completely OT: Is that climber clip genuine, if so is there a better source?

Edit: Answered by wooster, thanks.

Re: Replacing Clever Code with Unremarkable Code in Go

#9
post #6
post #2

I 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.

Completely OT: Is that climber clip genuine, if so is there a better source? Edit: Answered by wooster, thanks.

Here's a video from a different day (http://www.myspace.com/video/gnomeslice/amazing-wall-climber...)

I got that through TinEye, and then through comments left on various places. I think with a bit more noodling I would have got a name, but HN user Wooster got there 15 minutes ago.

This is the kind of thing that can be hard to get an answer to using web search engines.

Perhaps the Google search a day could be expanded to include "tricky" and "hard" levels?

Re: Replacing Clever Code with Unremarkable Code in Go

#10
> The channel is the analog to the Unix shell’s | character.

This sentence was italicized, and rightfully so. I've written a few small Go programs, but I haven't run into a problem where I thought, "A channel is definitely the right solution here." Yet I love and feel quite comfortable with shuffling data through big shell pipelines. Perhaps I'll think of a channel next time I'm reaching for a pipeline.

Post reply on HN