Skip to content

Instantly share code, notes, and snippets.

@ashalkhakov
Last active April 2, 2018 05:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashalkhakov/16cf939ba5a7e91cc68733c0441c029b to your computer and use it in GitHub Desktop.
Save ashalkhakov/16cf939ba5a7e91cc68733c0441c029b to your computer and use it in GitHub Desktop.
ATS sales pitch

Time well spent when programming

Audience: C/C++ programmers.

Improving correctness means less maintenance and more fun!

  • everybody want more features
  • but more features usually mean more bugs and failures
  • stuck fixing bugs? not a good use of your time!
  • yet software devs spend most of their time hunting for and fixing bugs

How does ATS help alleviate maintenance?

Less time spent on bug hunting, more time spent on making things compile.

  • safety by default (in contrast to C++)
  • ability to specify correctness properties (mostly things like: "this array is always dereferenced correctly", or "this memory is properly freed after use")
  • gradual improvement: no need to put a lot of effort upfront, write dirty code that works, and then sit down and improve efficiency and correctness (either or both, you have the tools!)
  • efficiency on par with C (but requires a C-style of coding where you have to spend more time proving safety, so it's a trade-off)

What does it take to use ATS?

The bar is pretty high, but I think it's better to spend time on these topics, than on chasing obscure bugs!

  • good knowledge of C
  • working knowledge of mathematics (this will help)
  • how to use types to your advantage

Why not C++ or Rust?

  • Rust is pretty fine! It is, however, a big departure from existing ecosystem (in contrast with ATS, which compiles to C). Some safety properties are easier to express in ATS than in Rust (but these properties will require more time to prove).
  • C++ is very complex. In terms of language complexity, ATS is simpler (although ATS is complex, too, but in a different sort of way).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment