News for hackers. Stuff that matters.
Re:Alternative code styles by yiyus on Monday October 15, 2018 @10:08AM (#18219733)
That's Whitney's style. My preferred example is http://www.kparc.com/b/b.c

It looks obfuscated, but in fact it is just a lot of information. Many people would claim dividing it in 10 files with longer function names and less tricks would make it easier to understand, but after spending a long time studying (and partly rewriting) this code, I actually find the terse version better.

Re:Alternative code styles by taneq on Monday October 15, 2018 @10:18AM (#18219865)
The problem with satire is that no matter how far over the line you think you've gone, someone will always wonder whether you really meant that.
Re:Alternative code styles by pavel_lishin on Monday October 15, 2018 @10:26AM (#18219918)
> after spending a long time studying (and partly rewriting) this code, I actually find the terse version better.

I'm sure Mr. Goldberg understood his machines just fine, too.

Re:Alternative code styles by jungler on Tuesday October 16, 2018 @02:21AM (#18227071)
I've tried Whitney's style and got some good takeaways from it. I don't need that level of density, but it made me realize that when the code is already doing something very abstracted from business logic, there is no sense in trying to name the variables with more than one or two letters. (x0 and x1, appearing in geometric functions, are favorites of mine.)

I also started using "result" after seeing it in Pascal code and have quite liked it for many years, but I just had the epiphany that "ans" (answer, as seen on several graphing calculator lines) would be a little more dense.

Basically, it was well worth it to try these radical styles out. They did a lot to smooth my everyday coding.