←back to thread

131 points apta | 1 comments | | HN request time: 0.389s | source
Show context
nemo1618 ◴[] No.9266433[source]
IMO, the author's "copy data to stdout" example betrays a lack of language understanding. Here's a more idiomatic version: http://play.golang.org/p/ZWatRuj3Q_
replies(6): >>9266451 #>>9266492 #>>9266537 #>>9266549 #>>9266585 #>>9274007 #
zoips ◴[] No.9266537[source]
Kind of code golfing it: http://play.golang.org/p/s53zQrE0ei
replies(1): >>9266690 #
sounds ◴[] No.9266690[source]
That's definitely shorter, but I would hope that isn't considered the most shining example of non-obfuscated code. :)

(For code golf, though, it's just fine.)

replies(1): >>9267323 #
1. NateDad ◴[] No.9267323[source]
It's actually very simple code, if you're at all familiar with go. That's probably what I would have written just by sitting down at the computer to do so for work.