5 ms·
> start to try mutate things for example it get 100x more complicated that Python. I don't know about 100x, using Box and mutexes it is pretty much as complica
by melissalobos 4y ago
> start to try mutate things for example it get 100x more complicated that Python.
I don't know about 100x, using Box and mutexes it is pretty much as complicated or maybe 2x. If you want it to be efficient and leverage all of Rust then sure, but that wasn't what they were meaning.
- Thaxll 4y agoI don't see where in Rust you could have code that looks high level as in Python.
- melissalobos 4y agohttps://actix.rs/ https://actix.rs/ Look at the first example. It can be very similar.
- jay_kyburz 4y agoHaha, I think you might need to have another look at Python.
- gpm 4y agoNote that their example is something like making a hello world web server using twisted (or whatever the current async framework is) in python... Strange example, but I suppose making the corresponding python more complex is one way to make them equivalent.
- deleted 4y ago[deleted]
- code_biologist 4y agoFor reference I'd say the "current async framework" is either Starlette [1] (low level) or FastAPI [2] (high level) for web stuff, and trio [3] for more stupidproof general async than twisted. IMHO of course! [1] https://www.starlette.io/ https://www.starlette.io/ [2] https://fastapi.tiangolo.com/ https://fastapi.tiangolo.com/ [3] https://trio.readthedocs.io/en/stable/ https://trio.readthedocs.io/en/stable/
- gpm 4y agoThanks, I appreciate it :)
- steveklabnik 4y agoI did a random little comparison a while back https://news.ycombinator.com/item?id=22712441 https://news.ycombinator.com/item?id=22712441 One tiny program does not a realistic comparison make, of course. There’s tons of situations where either language can make things more complex than this example. But for basic tasks it’s not particularly complicated.