The idea is to provide a better learning experience for C programmers (and maybe C++ programmers).
1. handling command line arguments (the argv type in ATS)
2. working with strings (strbuf, etc.-- why so many types for strings in ATS)
3. working with global mutable state (static memory allocation, precisely what one does in C)
4. separate modules (sats/dats distinction, focussing on what the C programmer does instead)
5. working with arrays (also why strbuf is not simply an array, although it might be backed by one)
6.
working with macros in C and ATS (also why macros are different in
ATS), with some typical examples (constants, conditional compilation,
etc.)
7. file or console I/O
8. printing values to STDOUT (and why ATS doesn't provide the printf function)
9. working with mutable pointer-based data structures (lists, trees, etc.)
10. doubly-linked data structures/various difficult-to-tackle aliasing scenarios
11. how to handle opt with by-ref parameters / what that means for C programmers (pointer-to-pointer etc.)
12. mutable state and branching/cases
13. loops/recursive functions (why use loops instead of functions and vice versa)
I just took the K&R's book about C and re-written their examples in ATS. It's really unfinished. Thoughts?