Hi all, I wrote this intro here:
https://ashalkhakov.gitbooks.io/ats-c-programming/content/ The idea is to provide a better learning experience for C programmers (and maybe C++ programmers). The plan is to cover these things: 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? -- You received this message because you are subscribed to the Google Groups "ats-lang-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscr...@googlegroups.com. To post to this group, send email to ats-lang-users@googlegroups.com. Visit this group at https://groups.google.com/group/ats-lang-users. To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/28067077-ae75-4f3c-bd61-dbc58af40149%40googlegroups.com.