[plt-scheme] HtDP ex 11.2.4
On Feb 18, 2006, at 12:50 PM, Richard Cleis wrote:
> After all, C can point to anything at any time ;)
One can do better in C too:
1. Use pointers to structures wherever you can.
2. Write down data definitions:
// a list is either null or cons(int,list)
3. Program as if you were in Scheme and pray that your c compiler
understands GC.
4. Link in Boehm-Weiser.
5. Avoid pointer arithmetic until necessary.
There is a book on functional programming in C. If you ever need to
program at that level, understand its lessons even if you don't follow
them.
-- Matthias