Ask HN: What source code is worth studying?
403 pointsThis is one my favourite questions, asked by idlewords: https://news.ycombinator.com/item?id=879101
But its been a long time since then, and with a new set of programming languages, I believe there are new code bases that's worth studying about and learning from.
So, which code-base should I be reading about to improve myself?
Comments (166) 76 threads
Earlier commentsHaskell: Snap https://github.com/snapframework/snap Snap is another project built in layers (snap-server, io-streams, snaplets, snap-core). The 1.0 release makes some pretty massive structural changes behind the scenes changes with minimal breakage of the public api and io-streams is a very nice api to work with.
JavaScript: Underscore.js http://underscorejs.org/docs/underscore.html Underscore is a utility library that gives a nice overview of various techniques in JS, such as how to handle equality, use of apply, ternary operators, etc. Many functions have fallbacks to ECMAScript 5 native functions.
https://github.com/tcltk/tcl/blob/master/generic/tclFCmd.c
It's very nicely commented and has a nice, easy to read style throughout (except for the regexp files).
Very clean (mostly) and very revised C code, following a strict code convention
(Of course it's kernel code, so some things don't apply to userspace, still)
http://www.lua.org/source/5.2/
All comments shown.
Couldn't load more comments. Check your connection and try again.