Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

No (safe) Rust is safe, while arbitrary assembly is unsafe. "Sugar" where the difference between the range (of elaboration) and codomain is significant is not sugar.

If we had an assembly+proofs language and a compiler from Rust to it, then I would agree. See CakeML for an example of research towards correctness-proof-preserving compilation.



I think you are using a different definition of "safe" than Rust folks use.


Actually this is for any definitional of "safe". The important part is codomain vs range. As long as the target language allows source language invariants to be preserved (by explicit proof or by construction (proof in meta theory)), I'd call it sugar.

This doesn't obviously match with Felleisen's notion of expressitivity (which might be used to draw the line between desugaring and general compilation), but I think I like it better. I value invariants over expressiveness.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: