It didn't convince me, though. There were a lot of "this tool or library or feature exists in Rust", but no comparative advantage over other languages more compelling than this:
> This certainly is in part because I’m more proficient in Rust than in Python. It’s also because the Rust mental model is closer to how my brain works than the Python one.
Someone also said the REPL, and while the REPL in Python is not as powerful as, i.e.: Clojure, it is still something that feels essential for a exploratory workflow that is the scripts case. Testing is not the same, it is much slower to interact, specially when you just want to check a hypothesis (also, most scripts I don't want to write tests, they will probably break anyway in a few months like the example of web scrapping I said above).
Check out IPython if you haven't, the REPL is a game changer.
- Hints and completions behind the Tab key
- Syntax highlighting as you type, along with auto-indentation
- Dynamic introspection with "?" and "??"
- Being able to run shell commands with "!" and capturing their output with "!!"
- Magic commands behind "%" and "%%"
- File system navigation
I've been a python dev for about a decade.
I do use the REPL a couple times a week, but I wouldn't really call it "essential".
How do people use it that makes it so valuable?
Usually I just use it when trying to figure out how to parse some text or check what methods or properties are available on an object. Really nothing that I couldn't do in a test suite or the code itself.
Also, it's more important the more data-dependent your code is.
I can see how a REPL would be really useful when working with data, but for building out a webserver or desktop application, it doesn't have nearly as much value.
I've never written code for which I've found the REPL that useful so either my domain is not conducive to REPL usage or I need a good tutorial or example to see what I missing and how to change my approach.
Any suggested videos or articles? though i suspect a video would be better for this type of thing
I am used to writing 2000 lines of code and having it run (mostly) correctly the first time. In C++, in my case. Otherwise my experience is like the author's. Types are not mainly for error checking. I demand they earn their keep as part of the solution, and they do.
But if you have to consume untyped input (such as parsing text), or produce untyped output (such as an image) then the value of a Notebook/REPL really shines.
So, AFAIK rust will generate a standalone exe, python, out of the box, will not so I want to give someone else my throw away solution, not requiring them to install python to use it might be a win?
Python has so many advantages for throwaway code with quick iteration. Duck typing. Easy string indexing. Bignum arithmetic by default. Trivial mutable globals. Default parameters. Trivial to make reference cycles. Access variables by name. Exceptions. And the big one is eval().