Skip to content

Comment on One year of Roto, a compiled scripting language for Rustparent

Comments

you missed the closing bracket.

glad you like python, but a good reason to use this is setup being easier, also for people using rust, chances are the syntax is better compared to python. (also for what its worth, i picked up rust MUCH faster than i ever did with python)

the main reason i like rust is its explicitness in typing along with its syntax choices. memory safety means little imo, outside of being difficult to do strange stuff (which could be good or bad depending on your approach)

cargo add roto

code main.rs

-FILE- main.rs use roto::*;

fn main(){ roto::init_runtime() roto::load_script("hello.roto") }

-FILE-END-

code hello.roto

-FILE- hello.roto fn main() { print("Hello, world!"); } -FILE-END-

cargo run

AboutSource Built by g1lg1l

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