Skip to content

Comment on Rust 0.4 releasedparent

Comments

What is the use case for a Rust JIT? A REPL or runtime eval()? I though the static compilation of Rust code was one of it selling points.

A REPL is extremely useful for learning, debugging (instead of using print statements, embed an interpreter to see exactly what is going wrong — IPython's one-line embed() for example), sketching (embed into an incomplete part of your program, try out a few things, when it works paste it to your source), and documentation (IPython's ? and ?? — completion is also part of that).

I think Rust's attractiveness is due to its type system, which does not necessarily need to be statically compiled.

Conversedly, you can have compilation and a REPL, Clojure has a repl yet is always compiled (repl instructions are compiled to JVM bytecode using the usual compilation toolset, then that bytecode is loaded and executed). According to http://www.haskell.org/ghc/docs/latest/html/users_guide/ghci..., GHCi's name doesn't lie and it's actually an interpreter.

Notice that the first link I posted there is to a working Rust REPL (though it's rather rough at the moment, there's a lot that could be done to improve it).

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.