Executive summary: ATS has a much more powerful type system, but from a human factors standpoint suffers from death by 1000 papercuts. Rust is much more usable as a tool, but very intentionally only pulls ideas from established research, and is somewhat more limited in what the type system can do.
Lifetimes (typically referred to as "regions" in the literature) come most directly from Cyclone (which first applied Tofte & Talpin's work on regions for ML-ish languages to the systems space). Type-level ownership tracking goes back to ATS (or possibly one of its predecessors, not sure) as well.
What rust does well is package up a lot of this knowledge into something that's actually a usable tool. The ATS compiler spits out some of the worst error messages I've ever seen, and while Xi has done some really incredible groundbreaking stuff, he doesn't have the kind of design sense that it takes to make tools that developers can actually use. It's the little stuff, really -- error messages, tooling, documentation. Some of the instructional material reads like stream-of-conciousness, and clearly doesn't have a specific audience in mind:
The biggest fundamental technical difference is dependent types. The Rust community has been flirting with some more limited forms of this; search for "const generics" to see what they're up to.
ATS's version of dependent types is of a different flavor than what's available in e.g. Idris/Agda/Coq, and not as powerful, but still able to do some really impressive things. There are still a lot of low-level tricks that folks regularly pull in C that can't be done in a type/memory-safe way in Rust, but can in ATS. This paper gives a neat example of converting an array to a linked list in-place, which I think is pretty mind-blowing:
I agree that ATS isn't as user friendly or polished as Rust, but the main reason for that is ATS development is pretty much a one person development team. Hongwei works on the compiler, writes the documentation, the libraries, etc. It hasn't gained a large community yet. Rust has the advantage of a major company backing it, paying developers, writers, etc. Hopefully ATS can build a community and improve on these things.
It isn't just that ATS is understaffed. I gave up trying to contribute because I got tired of getting active pushback on basic style issues that I would expect CS undergrads to have figured out by the end of their first semester.
Seriously, "When the dust settles, we will think of better names ..."
Hongwei is a great researcher, but he hasn't displayed particularly good judgment wrt. software engineering, and no amount of external contributors can fix problems that come down to a maintainer who actively pushes bad practices. It was almost heartbreaking to walk away from ATS for me, but I came to the conclusion that I just wasn't going to be able to fix the things that needed fixing while Hongwei was making decisions like these.
At (IIRC) Hac Boston 2012, Edwin Brady gave a talk on what was at the time a very work-in-progress version of Idris. There were several points during the talk where he went to demo some basic feature in the repl, got some nasty error message, and went "oh right, I haven't implemented that yet." But even then, it felt more polished than ATS does now.
This is the exact reason I ended up picking Rust over ATS, good documentation that's getting better, and all the advantages of a huge network effect: more, better libraries, community you can ask for help, books, more research, etc...
I've tried both ATS and Rust, and I found ATS difficult but mainly from its syntax, not the concepts which need to be learned no matter the language. I think Rust has difficult concepts to learn too, but the syntax is smoother than ATS's.
I'm still dabbling with Rust, but I have chosen to focus on Shen with type checking turned on. I think Shen will wind up with all I need for proving my code. I have tried Idris too, and I think it will capture a lot of the Haskell crowd, and when it evolves further, be a great alternative to ATS or Rust.
I would very much appreciate that article as a follower and fan of your work. You lead me down the Wasp Lisp road! Shen is amazing in that it combines a lot of things I am looking for in a PL. I wish I could contribute to libraries for it, since they will make it more useful from the get go.
Thanks for the kind words, it's definitely on my plans to write such a post.
I'd like to improve the speed of the Wasp Shen port too, it's pretty slow compared to the other ports. Still useable though which is good. I used it in a couple of projects, using the FFI to call Wasp's concurrency routines and it worked well.
I am not in need of speed, since I am learning. I am also learning Zig instead of Rust, and wondered if re-writing Wasp in Zig would be worthwhile?
I left ATS with hopes it would become 'smoother' syntax-wise in the future. I started programming low-level with Basic, C and Asm, went high-level, and now I am back to bit-banging and low-level. I thought Zig and Wasp Lisp would make a tight set of tools for this purpose without being baited to high-end PLs again!
How does double_of_uint work? Float 5.0 and (u)int 5 have different representations so you can't just do static type change and get correct result, you need a runtime conversion. I suppose it might be special cased in the compiler, but in that case it's bit of a poor example.
Anybody has experienced with both languages? Could you give a quick comparison of the languages?