3 ms·
> imo the biggest bang for the buck is just having good `#!` support. Shebangs don't really make sense for AOT compiled languages and I don't know why you woul
by duped 4y ago
> imo the biggest bang for the buck is just having good `#!` support.
Shebangs don't really make sense for AOT compiled languages and I don't know why you would really want one, but you can add `#!/usr/bin/env -S cargo run` to the top of a Cargo.toml file today and it will "work."
I just think the premise of "why didn't you write your last script in Rust" is flawed. It's a systems programming language, if I'm writing scripts I don't really care about the same things - like static typing or meticulous error handling.
It sounds like high effort and low reward imo.
A REPL though (not a true one necessarily - but live-reloading of dynamic rlibs and using dynamic dispatch in place of monomorphization for REPL-builds) would be extremely useful as a workflow tool.
- wizzwizz4 4y ago> Shebangs don't really make sense for AOT compiled languages Tell that to #!/usr/local/bin/tcc -run.
- epage 4y agoIt makes a big difference when you share a code sample, whether in a blog or on an issue, to have a single block of text to copy/paste including dependency declarations. It also lowers the barrier for experimentation. I have a directory with probably 40+ cargo-script's for one-off reproduction cases of bugs and it is much easier to work with than juggling multiple files and the overhead associated with it.
- steveklabnik 4y ago> one-off reproduction cases of bugs I had never considered this case before. I'm going to start doing this!