ATS did save me from some errors in my larger program that this snippet can be used to demonstrate:
- The read call must not read more data than the size of the buffer allows.
- The conversion to a C string in-place means we need to read one less than the size of the buffer.
- The file must be closed after use.
All these issues resulted in compile time errors. [!]
Saturday, February 26, 2011
Chris Double is again exploring ATS, a language with a very advanced type system:
Posted by Manuel Simoni at 12:21