Re:The Path to Rust
by Scarbutt on Thursday May 26, 2016 @02:08AM
(#11775910)
replacing python is a bit of stretch no? I'm sure you can, but is it practical? like for quickly hacking stuff up.
[ Parent
| on HN ]
Actually, no. I've found that I'm maybe even more productive in Rust than I am in Python, even for one-off tasks. The one exception is probably plotting, but I'm sure a Rust library for that isn't far off.
What's your replacement for Python REPLs like bpython or ptpython?
I barely, if ever, use/need a REPL. The shell has all the tools I need for short, one-off tasks.
Impressive, I'll have to check it out :)
Once upon a time I used Python for systems administration tasks and that was a long time ago, around 2003.
Python doesn't offer much against languages that compile to native code, have type inference (if strong typed) and REPL.
The only reason for me, would be if I am required to make use of a framework or library that requires me to use Python.
I use Scala for that kind of use case sometimes. If you have a REPL and you have good enough type inference you can pretty much just do what you would do in Python, and as a bonus you can reuse library functions from your real system rather than having to duplicate or shell out to them from your scripts
Re:The Path to Rust
by IndianAstronaut on Thursday May 26, 2016 @06:55AM
(#11776991)
I find getting stuff up and running with Go is quite easy. Just set up a small package with some quick hacks and then a separate file to run the package functions.