3 ms·
for an easier time, your favorite language interpreter's source code ... interpreters are easier to comprehend than compilers, since you can 'follow along' with
by pgbovine 17y ago
for an easier time, your favorite language interpreter's source code ... interpreters are easier to comprehend than compilers, since you can 'follow along' with the flow of execution in the main interpreter loop just like you're executing a program ... e.g., creating stack frames, allocating heap memory, assigning variables, etc.
- stcredzero 17y agoSqueak Smalltalk. For Java, if you can get hold of it, the old Acme Webserver. That was very clean code.
- omouse 17y agoSqueak is pretty sweet. I was looking at the Kernel category and the Parser classes. Pretty clean stuff.
- btilly 17y agoThis really depends on the language. Ruby's code is (or at least was) quite nice. It is pretty much OO written in plain C. By contrast Perl makes very heavy use of macros for portability, to an extent that may induce brain lock in many people, and makes your debugger very hard to follow. This is not to say that its use of macros is a bad thing in the end, but it is a definite shock.
- scrame 17y agoYeah, after hacking with perl for a while, i got interested in how it worked under the hood, and had some trouble following. Check out the regex compilation module: http://cpansearch.perl.org/src/GBARR/perl5.005_03/regcomp.c http://cpansearch.perl.org/src/GBARR/perl5.005_03/regcomp.c And execution: http://cpansearch.perl.org/src/GBARR/perl5.005_03/regexec.c http://cpansearch.perl.org/src/GBARR/perl5.005_03/regexec.c
- btilly 17y agoWell, anything touched by Ilya Zakharevich is going to be hard to read, even by the standards of the Perl source code. That means that the regular expression engine will be particularly hard to read.