Selection of Rust Motivation for Scryer #2034
Replies: 1 comment 1 reply
-
I did previously write a Shen programming language interpreter in Haskell, at https://github.com/mthom/shentong. I like Haskell a lot as a hobby language but I would argue that an eager functional language like OCaml is a better choice for an interpreter or compiler (the first Rust compiler for instance was written in OCaml). Debugging the space leaks in that modest Haskell project was not fun and it seemed to me a lot of Haskell/GHC expertise is needed to avoid them. Rust takes much of its inspiration from OCaml while being even more suited for low-level systems programming by, e.g., not having a garbage collector. Also, allowing precise control of memory in Unsafe Rust when needed. |
Beta Was this translation helpful? Give feedback.
-
"Scryer Prolog aims to become to ISO Prolog what GHC is to Haskell: an open source industrial strength production environment that is also a testbed for bleeding edge research in logic and constraint programming, which is itself written in a high-level language.". A laudable goal, and obviously the project devs were aware of Haskell. The type system and the garbage collection and lazy evaluation all would seem to be useful features.
I always thought Haskell would be an excellent language for building compilers and interpreters, and odd people insist on continuing on with imperative languages like C or Rust (or even worry about self-compiling).
Was Haskell considered at the start of this project, and what were the motivations to select Rust over Haskell or any other languages in the running?
Beta Was this translation helpful? Give feedback.
All reactions