3 ms·
I don't see where in Rust you could have code that looks high level as in Python.
by Thaxll 5y ago
I don't see where in Rust you could have code that looks high level as in Python.
- melissalobos 5y agohttps://actix.rs/ https://actix.rs/ Look at the first example. It can be very similar.
- jay_kyburz 5y agoHaha, I think you might need to have another look at Python.
- gpm 5y 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 5y ago[deleted]
- code_biologist 5y 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 5y agoThanks, I appreciate it :)
- steveklabnik 5y 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.