3 ms·
Is this person intentionally trying to make the C harder to read? What's with all the missing newlines? I didn't get past the first few examples, because the C
by mkelly 15y ago
Is this person intentionally trying to make the C harder to read? What's with all the missing newlines? I didn't get past the first few examples, because the C was so unnecessarily difficult to read, I assumed the Go was in similarly bad style. (I don't know Go.)
Maybe there's a point in there somewhere, but bad code samples distract from it.
- barrkel 15y agoIt seemed clear and fairly idiomatic to me, though it was clearly trying to reduce the line count. For maintainable code, I'd expect more newlines and a little more separation of assignments from comparisons, but not much more. Intuitions like these are rough though - it depends on how low in your perception stack you have the C operators etc. embedded.
- etaty 15y agoHis formatting style is just the best way to get lost ! if(...) ...;ELSE { } That's the first time I see this and hope the last.
- dreeves 15y ago"We deviate from standard style for compactness."
- jeffreymcmanus 15y agoCompactness is not a very good reason to deviate from the standard style, particularly since in Go, the standard style can in some cases have an impact on the syntax of the code.
- mkelly 15y agoTo what end? Is vertical space at some kind of premium? I have a scroll bar.
- k_kisiel 15y agoAgreed. Besides crappy formatting, he also makes his programs do confusing things. Why does the first example run in the infinite loop?
- philwelch 15y agoBecause that's what the "yes" utility does: "By itself, the yes command outputs 'y' or whatever is specified as an argument, followed by a newline repeatedly until stopped by the user or otherwise killed; when piped into a command, it will continue until the pipe breaks (i.e., the program completes its execution)." http://en.wikipedia.org/wiki/Yes_(Unix) http://en.wikipedia.org/wiki/Yes_(Unix)
- maartenscholl 15y agoThe first example is a basic implementation of the 'yes' unix shell utility.
- Lozzer 15y agoFrom the first line of the man page for yes: yes - output a string repeatedly until killed