markcornwell / pilar

incremental development of scheme compiler
1 stars 0 forks source link

Working list of design goals #13

Open markcornwell opened 8 years ago

markcornwell commented 8 years ago

1) Implement a subset of r5rs scheme. 2) Capable of compiling itself. 3) Capable of compiling a variant of e5chess 4) e5chess performance competitive with comparable C-programs 5) Compiled e5chess should execute tree searches at 800 KN per second, comparable to the performance observed in the C/C++ versions of my nchess program

markcornwell commented 8 years ago

A few more goals... 1) Maintain clear and understandable self-documenting source code. Liberally comment the source with the diagrams and facts used to write the programs. Include diagrams and tables. 2) Conform to standards (Don't be Weird). When implementing a new feature look to the standards. 3) Be consistent with Scheme concept of adhering to a small core of powerful primitives. 4) Get the semantics of primitives right -- lambda expressions, closures, support for upward/downward funargs, function parameters, let over lambda, environments. These form the foundations.

markcornwell commented 8 years ago

And a principle... Keep it Simple Stupid (KISS). Keeping it simple is hard. Often I have to think for days on end to get past the early solutions that occur to me, and reject lots of options that would work, to find something simpler that works better. Reminded of a quote attributed to Mark Twain: "I didn't have the time to write you a short letter, so I wrote you a long one." Thinking it through takes more time.

markcornwell commented 8 years ago

Another principle, Think first, then try. Got this from the little schemer and it is good advice. Iterative development balances thinking with trying. You've got to do both. These are the yin and yang of software. Think too much, you go down the wrong path. Try too much, you go down the wrong path. It is a balance.