Hi Artyom,

I am so pleased to see that you have finally got started writing the book :)

Definitely looking forward to more content.

In the following directory, I stored some examples showing a way in ATS
to make use the STL of C++:

https://github.com/githwxi/ATS-Postiats/tree/master/contrib/ats2cpp

Once you decide to move into C++, these examples could be useful to your
writing.

Cheers!

On Friday, April 6, 2018 at 2:38:44 AM UTC-4, Artyom Shalkhakov wrote:
>
> 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 [email protected].
To post to this group, send email to [email protected].
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/6df86f1a-52b0-4644-b224-4ff370252340%40googlegroups.com.

Reply via email to