Just like the objective of golf is to complete the course in the fewest number of strokes, code golf is a game that involves writing the shortest possible program to accomplish a given task. Several websites host code-golf tournaments, propose new tasks, and maintain player rankings. When the deadline for a given challenge expires, all submissions become public, and you can peek at the tricks that the best golfers used.
This appendix is almost the opposite of chapter 7 in that it will present the most obscure code in the book while breaking all style rules ever conceived. You’ve been warned.
Besides the fun factor, code golf can be a way to explore the dark corners of a language and learn a few tricks that may come in handy in normal programming circumstances.
18.220.140.5